Because when you have the assignment operator, the right-hand operand is evaluated first, then that value is assigned to the receiver on the left.¹
So here’s what happens in value = value++
:
- Read the value of
value
(100
) and set it aside (since we’ll need it in a minute). - Increase the value of
value
by one (making it101
). - Take the value from #1 (
100
) as the result value of the right-hand operand. - Store that value in
value
.
¹ In specification terms it’s slightly more complicated than that, but the details aren’t important here.
2
solved Why the value plus plus at last is 100? [duplicate]