Why is the operator precedence not followed here? [duplicate]
问题 This question already has answers here : What are the rules for evaluation order in Java? (5 answers) If parenthesis has a higher precedence then why is increment operator solved first? (5 answers) Closed 5 years ago . In this code: int y = 10; int z = (++y * (y++ + 5)); What I expected First y++ + 5 will be executed because of the precedence of the innermost parentheses. So value of y will be 11 and the value of this expression will be 15. Then ++y * () will be executed. So 12 * 15 = 180. So