2 ms·
Just open the Java Language Specification and look at the table of contents: chapter 15.7 is titled "Evaluation Order" and specifies it in detail.
by cesarb 8y ago
Just open the Java Language Specification and look at the table of contents: chapter 15.7 is titled "Evaluation Order" and specifies it in detail.
- chopin 8y agoThanks. What I had in mind applies to distinct statements not expressions. Funnily the chapter starts with the following caveat: It is recommended that code not rely crucially on this specification. Code is usually clearer when each expression contains at most one side effect, as its outermost operation, and when code does not depend on exactly which exception arises as a consequence of the left-to-right evaluation of expressions.