I understand the difference between this operations (post-increment, pre-increment). But question: I have an expression:
int x = 4;
long y = x * 4 - x++;
The highest priority has post-unary operator, than "*" and last "-". In my opinion it will be:
long y = x * 4 - x++;
1). x++ => return 4 (save x = 5)
2). final expression: 5 * 4 - 4 = 16
But when I compile this in IDE the answer is 12
! What's a problem and where did I do smth. wrong?