Boolean is a wrapper around boolean values.
It defines these constructors:
Boolean(boolean boolValue)
Boolean(String boolString)
boolValue
must be either true
or false
.
If boolString
contains the string "true" in uppercase or lowercase, then the new Boolean object will be true. Otherwise, it will be false.
To get a boolean value from a Boolean object, use booleanValue()
:
boolean booleanValue()
It returns the boolean value of the invoking object.