The \ sequence is interpreted by the compiler before compilation starts, so it reads \u00 as an error because \u is supposed to be followed by 4 (hexadecimal) digits/0. I am not convinced I would call those escape characters; that range includes mostly ordinary characters.
You realise you can cast an int to a char and print that with the %c tag? That might be a lot easier.
Joined: Mar 18, 2010
Converting an int to a char worked perfectly ... thank you. I was simply under the assumption that I had to use the escape character and the hexidecimal value of the character I was wanting to print.
Your code will have a problem if the HEX representation is just one character. Fortunately, Java 6 came with java.util.Formatter which is integrated into String.format and PrintStream.printf:
This will print \u, followed by i in 4 HEX digits (x makes it HEX, 04 gives it width 4 filling empty slots with 0).