What happens (behind the curtains) when this is executed?
int x = 7; x = x++;
That is, when a variable is post incremented and assigned to
++x is pre-increment -> x is incremented before being used x++ is post-increment -> x is incremented after being used
++x
->
x++
int x = 7; -> x get 7 value x = x++; -> x get x value AND only then x is incremented