java.lang.Double floatValue()


public float floatValue()

Java Code Example :

This java example source code demonstrates the use of floatValue() method of Double class.

Some takeaways on the longValue()  method:

  • returns the value of this Double as a float after a narrowing primitive conversion
  • specified by floatValue in class Number
  • since JDK 1.0

Sample Output :

Running the above example source code will give the following output

Suggested Reading List :

References :