Java AtomicBoolean.toString()

Syntax

AtomicBoolean.toString() has the following syntax.

public String toString()

Example

In the following code shows how to use AtomicBoolean.toString() method.


//  www.j a  v  a 2 s .  c o  m
import java.util.concurrent.atomic.AtomicBoolean;

public class Main {
  public static void main(String[] argv) throws Exception {
    AtomicBoolean atomicBoolean = new AtomicBoolean();
    
    System.out.println(atomicBoolean.toString());
  }
}

The code above generates the following result.





















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




AtomicBoolean
AtomicInteger
AtomicIntegerArray
AtomicLong
AtomicLongArray