public class CharAndIntTest { public static void main(String[] args) { char i=\'1\'; int ii=65; i=ii; } }
chars are 16-bit unsigned numbers, so they got a maximum of 65,635. ints are 32-bit signed numbers,s o they got a maximum of 2,147,483,647.
char
65,635
int
2,147,483,647
So something is bound to go wrong if you sign an int to a char, for all values >= 65,635.
>= 65,635