posted 24 years ago
Its the way the two assignments work:
When you use c += b, behind the scenes, this is what is actually happening (char)(c+b).
So the casting is taken care by JVM for you.
However in the first case, you are adding a char and a byte. This will return an int which who are assigning to a char variable. causing it to complain.
Trust this helps.