Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.atomic.AtomicInteger; public class AtomicIntegerIncrementAndGetExp4 { public static void main(String[] args) { AtomicInteger value = new AtomicInteger(2); value.incrementAndGet(); System.out.println("the updated number: "+value); } }
Output