public Float(String s) throws NumberFormatException
Constructs a newly allocated Float object that represents the floating-point value of type float represented by the string. The string is converted to a float value as if by the valueOf method.
valueOf
public static Float valueOf(String s) throws NumberFormatException
Returns a Float object holding the float value represented by the argument string s.
If s is null, then a NullPointerException is thrown.
Leading and trailing whitespace characters in s are ignored. The rest of s should constitute a FloatValue as described by the lexical syntax rules:
FloatValue: Signopt NaN Signopt Infinity Signopt FloatingPointLiteral
where Sign and FloatingPointLiteral are as defined in �3.10.2 of the Java Language Specification. If s does not have the form of a FloatValue, then a NumberFormatException is thrown.