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