Java AtomicInteger doubleValue() method

The doubleValue() method of Java AtomicInteger class returns the value of this AtomicInteger as a double after a widening primitive conversion.

Syntax

Return

It returns the double value of a given AtomicInteger.

Example 1

Test it Now

Output:

the double value of integer: 0.0

Example 2

Test it Now

Output:

the double value of integer: 10.0

Example 3

Test it Now

Output:

the double value of integer: 100.0

Example 4

Test it Now

Output:

the double value of integer: -10.0

Example 5

Test it Now

Output:

the double value of integer: 4.0





Latest Courses