byte b3 = 1; // Line 1
char c = (byte)2; // Line 2
c = 3; // Line 3
//c = b3; // Line 4
If Line 4 is uncommented, there is a "possible loss of precision" compiler error. What I am getting confused is, when its possible to assign a byte-casted value to a char type (Line 2), why is it not possible to assign a byte-declared variable directly to a char type (Line 4) ?
I am getting very confused in all these primitives type casting
Any tips would be appreciated
[ October 15, 2008: Message edited by: Rekha Srinath ]