Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.atomic.AtomicLong; public class AtomicLongSetExample3 { public static void main (String [] args) { AtomicLong atomiclong = new AtomicLong(-5); //Sets the Specified value atomiclong.set(-20); //Prints the Set value System.out.println(atomiclong); } }
Output