title: Return in if statement causing unreachable code error
body: <p>The following code:</p>
  
  <pre><code>public static void print(ListNode p)
  {
      System.out.print("[");
      if(p==null);
      {
          System.out.println("]");
          return;
      }
      ListNode k = p.getNext();
      //more code
  }
  </code></pre>
  
  <p>causes the following compile error:</p>
  
  <pre><code> ----jGRASP exec: javac -g Josephus_5_Rajolu.java
  
  Josephus_5_Rajolu.java:53: error: unreachable statement
              ListNode k = p.getNext();
                       ^
  1 error
  
   ----jGRASP wedge2: exit code for process is 1.
   ----jGRASP: operation complete.
  </code></pre>
  
  <p>Why is that happening?
  I am only returning if p = null. I want to do my other code if p!=null. Why is it unreachable?</p>