1 of 3

You can use an analogy of priority queues (maybe a hospital, if it isn't too gruesome; perhaps a queue for ordering work tasks)

A nurse doesn't need a patient to have some indicator that they are supposed to be treated before some other patients (these indicators are the parenthesis). There's simply a known treatment order, based on the urgency of the treatment.

If all patients need equally urgent treatment, then they are treated according to the order of their appearances (the ones who "check in" first are the ones treated first).

Nurses know how urgent a new patient's treatment is, and so does the compiler. For java, it goes like this:

1. postfix    expr++ expr--
2. unary  ++expr --expr +expr -expr ~ !
3. multiplicative * / %
4. additive   + -
5. shift  << >> >>>
6. relational < > <= >= instanceof
7. equality   == !=
8. bitwise AND    &
9. bitwise exclusive OR   ^
10. bitwise inclusive OR  |
11. logical AND   &&
12. logical OR    ||
13. ternary   ? :
14. assignment    = += -= *= /= %= &= ^= |= <<= >>= >>>=

(Taken from the Oracle Docs, numbering is mine. Originally has table)

The nurse (compiler) knows in which order to actually treat (execute\write to bytecode) the various levels or urgency.

Different languages might have different ordering, but the analogy of a nurse ordering the treatment based on urgency would still hold. In the example you gave, it's more "urgent" to deal with the AND than it is with OR.