Boolean class Method in Java

java.lang.Boolean

The Boolean class wraps a value of the primitive type boolean in an object. An object of type Boolean contains a single field whose type is boolean. 

Some Methods of Boolean class.

Boolean.compare() : It compares two boolean values.

Boolean.FALSE: The Boolean object corresponding to the primitive value false.

Boolean.getBoolean(): It returns true if and only if the system property named by the argument exists and is equal to, ignoring case, the string "true".

Boolean.hashCode()It returns a hash code for a boolean value.

Boolean.logicalAnd(): It returns the result of applying the logical AND operator to the specified boolean operands.

Boolean.logicalOr()It returns the result of applying the logical OR operator to the specified boolean operands.

Boolean.logicalXor(): It returns the result of applying the logical XOR operator to the specified boolean operands.

Boolean.parseBoolean(): It parses the string argument as a boolean. 

Boolean.toString(): It returns a String object representing the specified boolean.

Boolean.TRUE: The Boolean object corresponding to the primitive value true.

Boolean.valueOf()It returns a Boolean instance representing the specified boolean value.

Boolean.valueOf(String s): It returns a Boolean with a value represented by the specified string.


No comments:

Post a Comment