The problem with that code is the compiler converts unicode characters before it parses the code. Therefore, the
java compiler will end up seeing a line that looks like:
char c = '
';
which is illegal. I don't know the exact sequence the compiler goes through, but I suppose you could use unicode sequences to build up keywords and that would also work.
In any case, the compiler does not convert '\n' before parsing the code, so use that instead of '\u000A'.
Robert