float f = 9.0; //compilation error.
char c = 12; //not a compiation err
int i = 99;//not a compiation err
short s = i;//not a compiation err
However I'm getting an error when the value I assigned is more than the char/int/short range Eclipse is showing compilation error.
Is it the feature of Eclipse or JDK 1.6 NOT to give the compilation error when storing int into short, byte or char?
I was expecting a compilation error when Storing a large number in a small number. For Floating point data types this was true. but not with whole number data types.