Could someone tell me how parentheses are virtually set in this example? Is there a simple rule like 'if there are no parentheses, the first to checks build a pair'?
I mean, will z > 1 && y >6 be together or y > 6 || z == 2?
And this is why you should always use parens. really, there is zero cost to adding them, and having them saves the next person reading it (which could be yourself) the trouble of having to remember the correct operator precedence.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
For instance, this is one I frequently bump my head into: (Something)something.getFoo(); when they mean: ((Something)something).getFoo(), because dereferences (. or ) have a higher precedence than casts.
The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.