Table 2.5: Showing Logical Operators
Symbol
Meaning
&&
Logical AND
| |
Logical OR
!=
Logical NOT
Logical operators use true/false of expression to return a true or false value. The logical &&
operator returns a true value if both of its expressions are true. The logical | | operator returns a true
value if either of two expressions or both expressions are true. The logical ! operator works on a
single expression. If the expression results in true then the NOT operator makes it false or vice versa.
Do'stlaringiz bilan baham: