Java View all facts Glossary Help |
syntactic unit > symbol > operator > logical operator |
logical operator comparison table |
Subject | use | evaluate | have purpose | is an instance of | indicate | |
---|---|---|---|---|---|---|
! | to negate the value of the operand |
| unary operator | logical NOT | ||
& | an infix notation | both its operands | to return true if both operands evaluate to true | logical operator | ||
&& | an infix notation | its second operand only if the first operand returns true | to return true if both operands evaluate to true | short circuit operator | logical AND | |
| | an infix notation | both its operands | to return true if at least one of its operands evaluates to true | logical operator | ||
|| | an infix notation | its second operand only if the first operand returns false | to return true if at least one of its operands evaluates to true | short circuit operator | logical OR |
Next operator: new operator Up: operator Previous operator: identity comparison operator