Boolean

Wraps a Boolean value.

Methods:

Boolean, toSource, toString, valueOf

Method Listing

Constructor

Boolean Boolean (value:Varies)

Creates and returns a new Boolean object set to the value of the argument converted to a boolean.

Parameter

Type

Description

value

Varies

The value to be converted to a Boolean.

String toSource ()

Creates a string representation of this object that can be fed back to eval() to re-create an object. Works only with built-in classes.

String toString ()

Returns the string representation of the value of bool.

The method returns the string true if the primitive value of bool is true; otherwise it returns the string false.

Boolean valueOf ()

Returns the primitive value of bool.

The method returns true if the primitive value of bool is true; otherwise it returns false.