There are some terminologies in S/W field, I can explain this to you,
in a=a+1 assignment for a is measured after two steps
- System calculates the value of a (a new isolated copy is created here)
- System add 10 to isolated variable
a then the value of isolated a is assigned to left side a
But in second case,
- System knows the value of
a and directly add 10 to a (no isolated copy has been made here).
Hope this will be helpful to you, and one more thing, we usually use method that is a += 10; because it reduce the cost of operation, as per others one,