This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Look at the Integer class. It has methods to convert int to hex. Then prepend the \u with some 00s to it.
Joined: Jul 05, 2008
well i even tried '\u0123' but it still prints ? maybe windows do not support the char even if i say '\u0000' it doesnt print a 0, it simply doesnt prints anything. so what do we do if theres such a question in the exam that asks for the output it seems to be implementation dependent
Joined: Oct 13, 2005
I have already told you Windows/DOS tends not to support non-ASCII characters; I have sometimes had problems with characters in the range 0x80 to 0xff.
And '\u0000' isn't "0"; it is the null character, so you wouldn't expect anything to appear.