Originally posted by Asif Masood:
I am bit confused from the different behaviour for almost same expresion.
...
Why it's so.
Well, the hard-core answer is "because the Java language spec says so, and that is what you will be tested on". Practically, it is a mixture of language design (and hence arbitrary) and the difficulties in writing a compiler to make deductions about ranges of values based on variables and previous statements.
The issue you've spotted may seem inconsistent, but oh well, it is there. Think of "+=" as having more in common with "++" than a sequence of "a+b; a=b" statements. "++" doesn't cause promotion either.