Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.atomic.AtomicLong; public class AtomicLongLongValueExample4 { public static void main (String [] args) { AtomicLong atomiclong = new AtomicLong(-20); atomiclong.getAndIncrement(); //Returns the initialized value as long Long result = atomiclong.longValue(); //Prints the long value off atomic long System.out.println(result); } }
Output