Boolean Operators

Boolean operators use Boolean values as part of their expression evaluation. Any object variable, object variable method or object method used with these operators will attempt variable auto-conversion to a boolean type. The following table lists the boolean operators, the boolean logic performed, an example expression and the result of the expression.

Operator

Evaluation

Example

Result

Result Type

&&

Logical AND

true &&  true

true

Boolean

true && false

false

Boolean

false && false

false

Boolean

||

Logical OR

true || true

true

Boolean

true || false

true

Boolean

false || false

false

Boolean

!

Logical NOT

!true

false

Boolean

!false

true

Boolean