Module java.base
Package java.lang

Class Boolean

All Implemented Interfaces:
Serializable, Comparable<Boolean>, Constable

public final class Boolean extends Object implements Serializable, Comparable<Boolean>, Constable
The Boolean class wraps a value of the primitive type boolean in an object. An object of type Boolean contains a single field whose type is boolean.

In addition, this class provides many methods for converting a boolean to a String and a String to a boolean, as well as other constants and methods useful when dealing with a boolean.

This is a value-based class; programmers should treat instances that are equal as interchangeable and should not use instances for synchronization, or unpredictable behavior may occur. For example, in a future release, synchronization may fail.

See Also: