Here is some code that I found on the Internet:
class M{public static void main(String[]a){System.out.print(new char[]
{\'H\',\'e\',\'l\',\'l\',\'o\',\' \'
This is actually because of Unicode bidirectional support.
U+202E RIGHT TO LEFT OVERRIDE
U+202D LEFT TO RIGHT OVERRIDE
So, those are some tricky characters. They are actually defined for right-to-left language support. The real code is
class M{public static void main(String[]a){System.out.print(new char[]
{'H','e','l','l','o',' ','W','o','r','l','d','!'});}}
(got this by pasting into cmd.exe). Hope this answer helps you find out how this works.