Java AtomicInteger intValue() method

20 Mar 2025 | 1 min read

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

Output:

 the number is: 12 

Example 2

Output:

 the number is: 0 

Example 3

Output:

 the number is: 3 

Example 4

Output:

 the number is: -10 

Example 5

Output:

 the number is: -100