char c = 'c';
int x = 10;
Here is my problem: when I write c = c+x; I have an error and the solution is casting c = (char) (c+x); but when I write c+=x; without casting I have no error.
And the output after
c = (char) (c+x);
System.out.println(c+x);
is m
but the output after System.out.println(c+x);
is 119
What difference between c+=x; and c = c + x; in java