AtomicInteger.longValue() has the following syntax.
public long longValue()
In the following code shows how to use AtomicInteger.longValue() method.
import java.util.concurrent.atomic.AtomicInteger; /* w w w . j ava2 s .co m*/ public class Main { public static void main(String[] argv) throws Exception { AtomicInteger atomicInteger = new AtomicInteger(); atomicInteger.set(2); System.out.println(atomicInteger.longValue()); } }
The code above generates the following result.