subtracting char's

i didn't think this would work but it does, i guess it is because it works out what 16 bit codes the letters are and subtracts them from one another. ... class Hmm { public static void main(String[] args) { char c = 'c'-'a'; System.out.println(c); } } ... it results in a smiley face

So, you've discovered that char is an unsigned integer data type. 'c' is the 99th character and 'a' is the 97th character. 99 - 97 is 2. According to ASCIITable.com, the 2nd character is the start of text character. When displayed to my dos console, it sure looks like a face (though I cannot confirm his disposition).