Package java.lang
Class Float

Public Method valueOf

static Float valueOf(String s)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Returns the floating point value represented by the specified String. The string s is interpreted as the representation of a floating-point value and a Float object representing that value is created and returned. If s is null, then a NullPointerException is thrown. Leading and trailing whitespace characters in s are ignored. The rest of the string s should constitute a float value. If it does not have the form of a float value, then a NumberFormatException is thrown.

Example

   Logger.log("integer value: " + Float.valueOf("3.40283e30f"));

The example above returns the floating point value represented by the specified String.