This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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.