Normally in dealing with primitive type boolean we test equality by using == operators. This will no longer true if we are dealing with Boolean wrapper class because inherently to test two object equality we have to use the equals which is by default being inherited by all java objects from class Object.
Boolean f1 = true;
Boolean f2 = true;
Normally if the above code declaration uses float primitive type, the result would be true however since the boolean value true is assigned to wrapper class Boolean, it would print out false. If we wanted to use the == operator instead of equals, then we need to convert the Boolean values using the booleanValue() method of Boolean class.
f1.booleanValue() == f2.booleanValue()
The above code snippet would result to true.