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