Java: multiple ++-increases in one line. Which one first?
问题 Hey, I have the following two lines of code: result[i] = temp[i] + temp[i + 1] + " " + temp[i + 2]; i += 2; I am wondering if this line of code would do the same: result[i] = temp[i] + temp[i++] + " " + temp[i++]; Can I be sure, that EVERY VM would process the line from the left to the right? Thanks, Tobi 回答1: From Java language specification: The Java programming language guarantees that the operands of operators appear to be evaluated in a specific evaluation order, namely, from left to