Java tutorial
import java.util.concurrent.atomic.AtomicInteger; public class Main { public static void main(String[] argv) throws Exception { AtomicInteger atomicInteger = new AtomicInteger(); atomicInteger.set(2); System.out.println(atomicInteger.longValue()); } }