Float floatValue() in Java with examples Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The floatValue() method in Float Class is a built-in function in java that returns the value specified by the calling object as float after type casting. Syntax: public float floatValue() Return Value: It returns the value of FloatObject as float. Below programs illustrate floatValue() method in Java: Program 1: Java // Java code to demonstrate // Float floatValue() method class GFG { public static void main(String[] args) { // Float value Float a = 17.47f; // wrapping the Float value // in the wrapper class Float Float b = new Float(a); // floatValue of the Float Object float output = b.floatValue(); // prfloating the output System.out.println("Float value of " + b + " is : " + output); } } Output: Float value of 17.47 is : 17.47 Program 2: Java // Java code to demonstrate // Float floatValue() method class GFG { public static void main(String[] args) { String value = "54.1"; // wrapping the Float value // in the wrapper class Float Float b = new Float(value); // floatValue of the Float Object float output = b.floatValue(); // prfloating the output System.out.println("Float value of " + b + " is : " + output); } } Output: Float value of 54.1 is : 54.1 Reference: https://docs.oracle.com/javase/7/docs/api/java/lang/Float.html#floatValue() Comment More infoAdvertise with us Next Article Double floatValue() in Java with Examples G gopaldave Follow Improve Article Tags : Java java-basics Java-lang package Java-Functions Java-Float +1 More Practice Tags : Java Similar Reads Double floatValue() in Java with Examples The floatValue() method of Double class is a built-in method to return the value specified by the calling object as float after typecasting. Syntax: DoubleObject.floatValue() Return Type: It returns a float value i.e. the type casted value of the DoubleObject. Example 1: Java // Java Program to Impl 1 min read Double floatValue() in Java with Examples The floatValue() method of Double class is a built-in method to return the value specified by the calling object as float after typecasting. Syntax: DoubleObject.floatValue() Return Type: It returns a float value i.e. the type casted value of the DoubleObject. Example 1: Java // Java Program to Impl 1 min read Byte floatValue() method in Java with examples The floatValue() method of Byte class is a built in method in Java which is used to return the value of this Byte object as float. Syntax ByteObject.floatValue() Return Value: It return the value of ByteObject as float. Below is the implementation of floatValue() method in Java: Example 1: Java // J 2 min read Byte floatValue() method in Java with examples The floatValue() method of Byte class is a built in method in Java which is used to return the value of this Byte object as float. Syntax ByteObject.floatValue() Return Value: It return the value of ByteObject as float. Below is the implementation of floatValue() method in Java: Example 1: Java // J 2 min read Float intValue() method in Java with examples The intValue() method in Float Class is a built in method in Java that returns the value specified by the calling object as int after type casting. Syntax: public int intValue() Parameters: The function accepts no parameter. Return Value: It return the value of FloatObject as int. Below programs ill 2 min read Float intValue() method in Java with examples The intValue() method in Float Class is a built in method in Java that returns the value specified by the calling object as int after type casting. Syntax: public int intValue() Parameters: The function accepts no parameter. Return Value: It return the value of FloatObject as int. Below programs ill 2 min read Like