AtomicLong.doubleValue() has the following syntax.
public double doubleValue()
In the following code shows how to use AtomicLong.doubleValue() method.
//from w ww . j av a 2s. c om import java.util.concurrent.atomic.AtomicLong; public class Main { public static void main(String[] argv) { AtomicLong nextId = new AtomicLong(); System.out.println(nextId.getAndIncrement()); System.out.println(nextId.doubleValue()); } }
The code above generates the following result.