title: Java not printing messages after `finally` block
body: <p>This question relates to the <code>finally</code> blocks in Java. Here "rest of the code" is not printing, which is after the <code>finally</code> block.</p>
  
  <p>But when an exception is not there then it will print whatever is after the <code>finally</code> block.</p>
  
  <pre><code>class TestFinallyBlock1 {  
      public static void main(String args[]) {  
          try {  
              int data=25/0;  
              System.out.println(data);  
          }  
          catch(NullPointerException e) {
             System.out.println(e);
          }  
          finally {
             System.out.println("finally block is always executed");
          }  
  
          System.out.println("rest of the code...");  
      }  
  }  
  </code></pre>