Java AtomicInteger intValue() method

The intValue() method of Java AtomicInteger class returns integer value of a given number.

Syntax

Return

It will return the integer value of Atomic integer value.

Example 1

Test it Now

Output:

the number is: 12

Example 2

Test it Now

Output:

the number is: 0

Example 3

Test it Now

Output:

the number is: 3

Example 4

Test it Now

Output:

the number is: -10

Example 5

Test it Now

Output:

the number is: -100





Latest Courses