Can someone explain to me why the following code compiles OK in Java?
char c = 'a' + 10;
int i = 10;
char c = 'a' + i;
'a' + 10 is a compile-time constant expression with the value of
'k', which can initialise a variable of type
char. This is the same as being able to assign a
byte variable with a literal integer in [-128, 127]. A
byte in the range of [128, 255] may be more annoying.