title: Why is executing Java code in comments with certain Unicode characters allowed?
body: <p>The following code produces the output "Hello World!" (no really, try it).</p>
  
  <pre><code>public static void main(String... args) {
  
     // The comment below is not a typo.
     // \u000d System.out.println("Hello World!");
  }
  </code></pre>
  
  <p>The reason for this is that the Java compiler parses the Unicode character <code>\u000d</code> as a new line and gets transformed into:</p>
  
  <pre><code>public static void main(String... args) {
  
     // The comment below is not a typo.
     //
     System.out.println("Hello World!");
  }
  </code></pre>
  
  <p>Thus resulting into a comment being "executed".</p>
  
  <p>Since this can be used to "hide" malicious code or whatever an evil programmer can conceive, <strong>why is it allowed in comments</strong>?</p>
  
  <p>Why is this allowed by the Java specification?</p>