Java Float.floatValue()
Syntax
Float.floatValue() has the following syntax.
public float floatValue()
Example
In the following code shows how to use Float.floatValue() method.
public class Main {
public static void main(String[] args) {
Float floatObject = new Float("10.01");
float b = floatObject.floatValue();
System.out.println("float:"+b);
}/* www .j a v a2 s . co m*/
}
The code above generates the following result.