Java AtomicInteger longValue() method

The longValue() method of Java AtomicInteger class returns the long value of a given atomicinteger.

Syntax

Return

this method will return the atomic Integer value as long value.

Example 1

Test it Now

Output:

the  long value is: 1000

Example 2

Test it Now

Output:

the long value is: 1222

Example 3

Test it Now

Output:

the  long value is: 1024

Example 4

Test it Now

Output:

the  long value is: 1097

Example 5

Test it Now

Output:

the  new number is: 4535





Latest Courses