Logical operators are used to check whether an expression is true or false. They are used in decision making.

OperatorExampleMeaning
&& (Logical AND)expression1 && expression2true only if both expression1 and expression2 are true
| (Logical OR)expression1 | expression2true if either expression1 or expression2 is true
! (Logical NOT)**!**expressiontrue if expression is false and vice versa