I am resurrecting an ancient
thread (
https://coderanch.com/t/192253/java-programmer-SCJP/certification/BItwise-logical-operators). From what I can tell, the issue, at least for me, wasn't addressed - although I suppose you could argue it was addressed implicitly.
The possible answers are:
1. 1st digit printed is 1
2. 1st digit printed is 2
3. 1st digit printed is 3
4. 2nd digit printed is 1
5. 2nd digit printed is 2
6. 2nd digit printed is 3
Why don't the precedence rules affect the answer?
That is, shouldn't what's in the Parentheses be resolved first, followed by resolving the Less Than, <, and lastly resolving the Or, ||?
It seems to me the jls has turned the set of precedence rules on its head. That is, the jls seems to say "here are the precedence rules, where || has less priority than parentheses and less priority than < except sometimes those precedences don't matter and || overrides everything else with the highest precedence". Is this a nuance or am I missing a rule?
Thanks.
Matt