Java AtomicInteger floatValue() method

The floatValue() method of Java AtomicInteger class returns the value of the AtomicInteger as a float after a widening primitive conversion..

Syntax

Return

It returns the float value of a given AtomicInteger.

Example 1

Test it Now

Output:

the float value of integer: 0.0

Example 2

Test it Now

Output:

the float value of integer: 10.0

Example 3

Test it Now

Output:

the float value of integer: 100.0

Example 4

Test it Now

Output:

the float value of integer: -10.0

Example 5

Test it Now

Output:

the float value of integer: -4.0





Latest Courses