You can write hex integers in Java using 0xNNNN. They're normal numbers, and you can add and subtract them, etc.
A \uNNNN is not a number. The Java compiler translates these "Unicode escapes" into their corresponding characters very early in the compilation process, so that the translated version is what serves as input to the compiler. For example, if you write
\uXXXX is turned into program text before the compiler starts to look at the program. You use Unicode escapes to include characters in your program text that you can't type from your keyboard -- i.e., if you want your variables to have names made up of Arabic characters, or you want to print a String in Hebrew.
Joined: Feb 23, 2004
oh I see.. just as we used to type alternate texts by pressing ALT and some combination of numbers.