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