How to check if two boolean values are equal?
The ==
operator works with booleans.
boolean isEqual = (bool1 == bool2);
(The parentheses are unnecessary, but help make it easier to read.)
The ==
operator works with booleans.
boolean isEqual = (bool1 == bool2);
(The parentheses are unnecessary, but help make it easier to read.)