Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.atomic.AtomicLong; public class AtomicLongIncrementAndGetExample1 { public static void main (String [] args) { AtomicLong atomiclong = new AtomicLong(); //Increments the Initialized value Long result = atomiclong.incrementAndGet(); //Prints the updated value System.out.println("Updated Value : " + result); } }
Output