AtomicBoolean.lazySet(boolean newValue) has the following syntax.
public final void lazySet(boolean newValue)
In the following code shows how to use AtomicBoolean.lazySet(boolean newValue) method.
import java.util.concurrent.atomic.AtomicBoolean; // w w w . ja v a2s .c om public class Main { public static void main(String[] argv) throws Exception { AtomicBoolean atomicBoolean = new AtomicBoolean(); atomicBoolean.lazySet(true); } }