1.
byte b=5 (can hold upto127 without casting)
int a=6 (all integer literals are by default int)
a= a+b -> will always be int even if you dont cast it.
but b=a+b -> here you will need explicit casting like b=(byte)(a+b)
2. byte b=5;
int a=6;
a+=b; -> Automatic casting done by compiler so even b+=a will compile in this case.