Talk:Java Programming/Answers to Exercises

The answer to Exercise 1 needs work. Your current explanations says associativity is the same and never really explains associativity vs precedence. Yes multiply and divide have higher precedence to addition, but the multiply goes before the divide because binary operators are left associative (not because of precedence). Similarly the explanation for the assignment operator is not operator precedence but the fact that unary and assignment operators are right associative. See also Operator associativity.

Start a discussion about Java Programming/Answers to Exercises

Start a discussion
Return to "Java Programming/Answers to Exercises" page.