Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.atomic.AtomicInteger; public class AtomicIntegerGetAndAddExp3 { public static void main(String[] args) { AtomicInteger number = new AtomicInteger(-100); number.getAndAdd(100); System.out.println("Updated number is: " + number); } }
Output