Module java.base
Package java.lang

Class Boolean

java.lang.Object
java.lang.Boolean
All Implemented Interfaces:
Serializable,Comparable<Boolean>,Constable

public final classBooleanextendsObjectimplementsSerializable,Comparable<Boolean>,Constable
The Boolean class wraps a value of the primitive typeboolean in an object. An object of typeBoolean contains a single field whose type isboolean.

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

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

Since:
1.0
See Also: