Why can't I use the 'u000a' and 'u000d' Unicode character literals in Java source code?

John Mitchell

This is an unfortunate artifact of the ordering of the processing of the Java source file into lexemes and tokens by the compiler. Instead, you should use the equivalent character escape sequences: ' ' and ' '.

Also see What character escape sequences are available in Java?

For the full scoop on the order of processing, see chapter 3 of the JLS v2 (particularly 3.10.4, 3.2, and 3.3).

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.