Problem parsing unicode escape in a Java 6 String literal…?

Why does this compile in java 6 (Sun 1.6.0_16):

System.out.println("\u000B");

... but not this:

System.out.println("\u000A");

On this program:

public class Test {
  public static void main(String argv[]) {
  System.out.println("\u000A");
  }
}

I get a

Test.java:3: unclosed string literal
System.out.println("\u000A");

What's going on here?

10
задан Dafydd Rees 25 October 2010 в 08:30
поделиться