Java AtomicBoolean.get()
Syntax
AtomicBoolean.get() has the following syntax.
public final boolean get()
Example
In the following code shows how to use AtomicBoolean.get() method.
import java.util.concurrent.atomic.AtomicBoolean;
/* w w w .j av a 2 s . c om*/
public class Main {
public static void main(String[] argv) throws Exception {
AtomicBoolean atomicBoolean = new AtomicBoolean();
System.out.println(atomicBoolean.get());
}
}
The code above generates the following result.