java.lang.Double longValue()


public long longValue()

Java Code Example :

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

Some takeaways on the longValue()  method:

  • returns the value of this Double as a long after a narrowing primitive conversion.
  • specified by longValue in class Number

Sample Output :

Running the above example source code will give the following output

Suggested Reading List :

References :