Andrius Orlonas wrote:Cast operator has the highest precedence . . .
No, as people have already told you, it doesn't.
The whole idea of that sort of question is to remind you that although
x++ has a higher precedence than casts, the post‑increment is hidden until the next time the variable is used. Also remember, if the value of
x is outside the range -2147483648...2147483648
exclusive, the increment will be annihilated by the cast. You will find all the gory details about casts in the
Java Language Specification (=JLS).