If the operands of an equality operator are both of type boolean
, then the operation is boolean equality. The boolean
equality operators are associative.
The result of ==
is true
if the operands are both true
or both false
; otherwise, the result is false
.
The result of !=
is false
if the operands are both true
or both false
; otherwise, the result is true
. Thus !=
behaves the same as ^
(§15.21.2) when applied to boolean operands.