Javatpoint Logo
Javatpoint Logo

Java Double floatVlaue() method

The floatVlaue() method of Double class returns a float value of this double object.

Syntax

Parameters

NA

Return value

The floatValue() method returns the double value converted to type float .

Example 1

Test it Now

Output:

55.05587687687 after converted to float becomes : 55.055878

Example 2

Test it Now

Output:

Double value = 9.87979878768757E19
Float value  = 9.879799E19

Example 3

Test it Now

Output:

Error:(19, 24) java: double cannot be dereferenced

Next TopicJava Double





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