Paul Clapham wrote:(As I understand it, those temporary results are stored in a stack in real life, and I expect "x++" results in something being stored in that stack too, but you don't need to care.)
Correct. The result of an expression is always stored on the operand stack.
In bytecode, literally the only difference between the operators is whether the value of the variable is duplicated onto the stack before addition, or after addition.
Post-increment:
Pre-increment:
(I used a static variable because it simplifies the bytecode a little bit)