Originally posted by Nikki Freeman:
...int i = 00000110;
System.out.println(i); // = 72 not 6...
An integral literal that begins with zero is interpreted as octal (base 8). So 0110 is 64 + 8 = 72.
Similarly, hexadecimal (base 16) literals are prefixed with a zero and the letter 'x', using letters a-f to represent 10-15. For example, 0x1c represents 28.
You should expect bit questions on the 1.4 exam, so you should spend some time getting more comfortable with this.