|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
The Boolean object references a Boolean value.
The Boolean object is a wrapper for Boolean data. The primary purposes for the Boolean object are to collect its properties into one object and to allow Boolean values to be converted into strings via the toString method. The Boolean object is similar to the boolean data type. However, they have different properties and methods.
You rarely need to construct a Boolean object explicitly. The boolean data type should be used in most circumstances. Since the Boolean object interoperates with the boolean data type, all Boolean object methods and properties are available to a variable of type Boolean. For more information, see boolean Data Type.
The data type of a Boolean object is Object, not boolean.