Integer floatValue()
Java Integer floatValue() Method
Last Updated : 17 Mar 2025
The floatValue() method is a method of Integer class under java.lang package. This method returns the float equivalent value of this Integer object. The floatValue() method were specified from the Number Class. It may also involve in rounding or truncation of the Integer value.
Syntax:
Following is the declaration of floatValue() method:
Parameter:
| DataType | Parameter | Description |
|---|---|---|
| NA | NA | It does not accept any parameter. |
Returns:
The floatValue() method will return the numeric value represented by this object after conversion to type float.
Exceptions:
NA
Compatibility Version:
Java 1.2 and above
Example 1
Output:
Value : 2454.0 Value : 8.6549872E7
Example 2
Output:
Enter The Input Values: 2343543 34546658233654 Value : 2343543.0 Value : 3.45466575E13
Example 3
Output:
Value is = 1.5
Example 4
Output:
Enter The Desired Input Value: 46567 The Float Value is: 46567.0
Next TopicJava-integer-hashcode-method