3 added 195 characters in body edited Jul 26 '17 at 19:37 ItamarG3 4,54822 gold badges1616 silver badges5353 bronze badges 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) In effect, the function and member call are before all other operators. So . is of precedence 0. 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. So in SQL, some operators are dealt with before others. Some operators require expressions on both sides, and some don't (select only needs from the right, while AND needs from both sides). 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) In effect, the function and member call are before all other operators. So . is of precedence 0. 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. 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) In effect, the function and member call are before all other operators. So . is of precedence 0. 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. So in SQL, some operators are dealt with before others. Some operators require expressions on both sides, and some don't (select only needs from the right, while AND needs from both sides). 2 added 106 characters in body edited Jul 26 '17 at 19:12 ItamarG3 4,54822 gold badges1616 silver badges5353 bronze badges 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) In effect, the function and member call are before all other operators. So . is of precedence 0. 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. 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. 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) In effect, the function and member call are before all other operators. So . is of precedence 0. 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. 1 answered Jul 26 '17 at 18:36 ItamarG3 4,54822 gold badges1616 silver badges5353 bronze badges 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.