title: Java Compiler: Stop complaining about dead code
body: <p>For testing purposes, I often start typing some code in an already existing project. So, my code I want to test comes before all the other code, like this:</p>
  
  <pre><code>public static void main(String[] args)
  {
      char a = '%';
      System.out.println((int)a);
      // To know where '%' is located in the ASCII table.
  
      // But, of course, I don't want to start the whole project, so:
      return;
  
      // The real project starts here...
  }
  </code></pre>
  
  <p>But the compiler complains about the <code>return</code>-statement, because of the following "dead code". (While in C++ the compiler obeys the programmer and simply compiles the return statement)</p>
  
  <p>To prevent the compiler complains, I write a stupid <code>if</code>-statement:</p>
  
  <pre><code>if (0 != 1) return;
  </code></pre>
  
  <p>I hate it. Why can't the compiler do what I ask? Are there some compilation flags or annotations or whatever to solve my problem?</p>
  
  <p>Thanks</p>