What is the Boolean class?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the Boolean class?
Rating:
The Boolean class is a wrapper class that is used to wrap true or false type primitive values in a Boolean object.
This class defines two constructors with the following signatures:
The first form of the constructor takes a primitive type boolean as an argument, whereas the second form takes a string argument.
Most often, the second form of the constructor is used. It creates a Boolean object representing a true value if the argument passed as a string is "true", ignoring the case of the string. Otherwise, it creates a Boolean object representing a false value.
Rating:
Was this information helpful?
Other articles
- What is the String + operator?
- Things to practice for Sun test CX310-055.
- What is a block?
- What is the random() method?
- What is the ternary (?:) operator?