Java AtomicInteger.floatValue()

Syntax

AtomicInteger.floatValue() has the following syntax.

public float floatValue()

Example

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


import java.util.concurrent.atomic.AtomicInteger;
//from ww  w.  j a v a  2  s  . co  m
public class Main {
  public static void main(String[] argv) throws Exception {
    AtomicInteger atomicInteger = new AtomicInteger();
    
    System.out.println(atomicInteger.floatValue());
  }
}

The code above generates the following result.





















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




AtomicBoolean
AtomicInteger
AtomicIntegerArray
AtomicLong
AtomicLongArray