class MyClass { public static void main(String []args) { final int i=100; byte b = i; System.out.println(b); } } After run the above code, it compile and print 100. Why it does not need an explicitly cast? i is larger than byte, right? Please help! Thanks
that is really bizarre, i had not heard of this (i am of course still learning). i guess, it is allowed, because if the int is final (not allowed to be changed), and fits in the range of a byte, then it can be done?