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