Boolean Logical Exclusive OR (^)

A simple condition containing the boolean logical exclusive OR (^ ) operator is true if and only if one of its operands is true and the other is false. If both are true or both are false, the entire condition is false. Figure 5.17 is a truth table for the boolean logical exclusive OR operator (^). This operator is guaranteed to evaluate both of its operands.

Image

Fig. 5.17 | ^ (boolean logical exclusive OR) operator truth table.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.