Java AtomicInteger get() method

The get() method of Java AtomicInteger class gets the current value of Atomic integer.

Syntax

Return

It returns the current value of Atomic integer.

Example 1

Test it Now

Output:

10

Example 2

Test it Now

Output:

0

Example 3

Test it Now

Output:

-100

Example 4

Test it Now

Output:

43

Example 5

Test it Now

Output:

34





Latest Courses