Why can some ASCII characters not be expressed in the form '\uXXXX' in Java source code?
<p>I stumbled over this (again) today:</p>

<pre><code>class Test {
    char ok = '\n';
    char okAsWell = '\u000B';
    char error = '\u000A';
}
</code></pre>

<p>It does not compile: </p>

<blockquote>
  <p>Invalid character constant in line 4.</p>
</blockquote>

<p>The compiler seems to insist that I write '\n' instead. I see no reason for this, yet it's <em>very</em> annoying.</p>

<p>Is there a logical explanation why characters that have a special notation (like <code>\t</code>, <code>\n</code>, <code>\r</code>) <em>must</em> be expressed in that form in Java source?</p>
