class SomeLiterals { public static void main (String args[]) { int iWk; long lWk; float fWk; double dWk; String sWk; boolean bWk; // Literal Integers: iWk = 25; // Decimal integer iWk = 025; // Assumed to be octal 25 = 21 decimal iWk = 0x25; // Assumed to be hex 25 = 37 decimal lWk = 25L; // Forced to be a long integer. // Literal floating points: dWk = 2.0d; // Double precision fWk = 2.0f; // Float dWk = 2.0; // Default is double // Literal String: sWk = "Hello World"; // A String // Literal Booleans: bWk = true; // true bWk = false; // false } }