    // Demonstrate the effect of casting between integer types.
public class CastExample {
    public static void main(String[] args){
        // A negative value.
        int i = -65533;
        short s;

        System.out.println("i = "+i);
        // Casting involves loss of the top 16-bits of i.
        s = (short) i;
        System.out.println("s = "+s);
    }
}
