/* * This program illustrates java types. */ public class Types { public static void main(String[] args) { System.out.println("014 = " + 014); System.out.println("12 = " + 12); System.out.println("0xC = " + 0xC); System.out.println("0b1100 = " + 0b1100); short a = 4; a = (short)(a + 3); // This is allowed by the compiler. a = a + 3; // but this is not. byte b = 10; // This is allowed by the compiler. byte b = 1000; // but this is not. } }