Originally posted by Peter Mularien:
Remember boolean operators are evaluated left to right, and boolean operators (&&, ||) are higher in precedence than binary logical operators (&, |).
No; the bitwise operators & and | have higher precedence than the logical operators && and ||.
The Java Tutorial: Operators has a table with the operator precedences.
So line 1: false && true || true is evaluated as (false && true) || true which is
true And line 7: false && true | true is evaluated as false && (true | true) which is
false [ September 18, 2007: Message edited by: Jesper Young ]