Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.atomic.AtomicLong; public class AtomicLongToStringExample4 { public static void main (String [] args) { AtomicLong atomiclong = new AtomicLong(-20); atomiclong.getAndIncrement(); //Converts the atomic long value to String String result = atomiclong.toString(); //Prints the String value off atomic long System.out.println(result); } }
Output