code: public static boolean isFloat(String s) {
          if (isEmpty(s)) return defaultEmptyOK;
  
          boolean seenDecimalPoint = false;
  
          if (s.startsWith(decimalPointDelimiter)) return false;
  
          // Search through string's characters one by one
          // until we find a non-numeric character.
          // When we do, return false; if we don't, return true.
          for (int i = 0; i < s.length(); i++) {
              // Check that current character is number.
              char c = s.charAt(i);
  
              if (c == decimalPointDelimiter.charAt(0)) {
                  if (!seenDecimalPoint)
                      seenDecimalPoint = true;
                  else
                      return false;
              } else {
                  if (!isDigit(c)) return false;
              }
          }
          // All characters are numbers.
          return true;
      }
docs: True if string s is an unsigned floating point(real) number.
  
  Also returns true for unsigned integers. If you wish
  to distinguish between integers and floating point numbers,
  first call isInteger, then call isFloat.
  
  Does not accept exponential notation.