Java AtomicLong doubleValue() Method

The doubleValue() method of java AtomicLong class returns the current value of this AtomicLong as a double after a widening primitive conversion.

Syntax

Returns

the numeric value represented by this object after conversion to type double.

Example 1

Test it Now

Output:

0.0

Example 2

Test it Now

Output:

123456.0

Example 3

Test it Now

Output:

-654321

Example 4

Test it Now

Output:

-11.0




Latest Courses