6.2. Boolean Operators

These are logical operators, that works with boolean datatype, two are binary one is unary. The result is always boolean.

OperatorDatatypeDescription
&&booleanTrue if both operands are true, otherwise false (logical and).
||booleanTrue if at least one of the operands is true, otherwise false (logical or).
!booleanTrue if the operand if false, otherwise false (logical not).