Javatpoint Logo
Javatpoint Logo

Java Integer floatValue() Method

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

Test it Now

Output:

Value : 2454.0
Value : 8.6549872E7

Example 2

Output:

Enter The Input Values: 
2343543
34546658233654
Value : 2343543.0
Value : 3.45466575E13

Example 3

Test it Now

Output:

Value is = 1.5

Example 4

Output:

Enter The Desired Input Value: 46567
The Float Value is: 46567.0






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA