Java AtomicInteger.doubleValue()

Syntax

AtomicInteger.doubleValue() has the following syntax.

public double doubleValue()

Example

In the following code shows how to use AtomicInteger.doubleValue() method.


//from   w  ww .  ja v a  2  s .c  o m
import java.util.concurrent.atomic.AtomicInteger;

public class Main {
  public static void main(String[] argv) throws Exception {
    AtomicInteger atomicInteger = new AtomicInteger();
    
    System.out.println(atomicInteger.doubleValue());
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.util.concurrent.atomic »




AtomicBoolean
AtomicInteger
AtomicIntegerArray
AtomicLong
AtomicLongArray