Example usage for java.util.concurrent.atomic AtomicLong floatValue

List of usage examples for java.util.concurrent.atomic AtomicLong floatValue

Introduction

In this page you can find the example usage for java.util.concurrent.atomic AtomicLong floatValue.

Prototype

public float floatValue() 

Source Link

Document

Returns the current value of this AtomicLong as a float after a widening primitive conversion, with memory effects as specified by VarHandle#getVolatile .

Usage

From source file:Main.java

public static void main(String[] argv) {
    AtomicLong nextId = new AtomicLong();

    System.out.println(nextId.getAndIncrement());
    System.out.println(nextId.floatValue());
}