C.20. Logical Operators
Java’s logical operators enable you to form more complex conditions by combining simple conditions. The logical operators are &&
(conditional AND), ||
(conditional OR), &
(boolean logical AND), |
(boolean logical inclusive OR), ^
(boolean logical exclusive OR) and !
(logical NOT). [Note: The &
, |
and ^
operators are also bitwise operators when they’re applied to integral operands.]
Get Android™ How to Program, Second 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.