I\'d a code snippet:
class AutoTypeCast{ public static void main(String...args){ int x=10; byte b=20;//no compilation error byte c=x;
20 is in -128..127 range, so it's value fits into byte.
20
-128..127
byte