Misunderstanding Java operator precedence is a source of frequently asked questions and subtle errors. I was intrigued to learn that even the Java Language Specification says, "It is recommended that code not rely crucially on this specification." JLS §15.7 Preferring clear to clever, are there any useful guidelines in this area?
As noted here, this problem should be studied in the context of Evaluation Order, detailed here. Here are a number of resources on the topic:
Additions or corrections welcome.
As far as the "Real World" is concerned, it's probably fair to say:
So, apart from the specific case of */
vs +-
, I'd really just use brackets to explicitly define the precedence intended.