title: Why this code is coming first in finally and then catch block?
body: <pre><code>package testing;
  
  public class ExceptionHandling {
      public static void main(String[] args){
          try{
          int a=10;
          int b=0;
          int c=a/b;
          ExceptionHandling exp = null;
          System.out.println(exp);
          throw new NullPointerException();
  
          }catch(ArithmeticException e){
              System.out.println("arithmetic issue");
              throw new ArithmeticException();
          }
          catch(NullPointerException e){
              System.out.println("nullpointer");
  
          }
          finally{
  
              System.out.println("exception");
              //throw new ArithmeticException();
          }
  
      }
  
  }
  </code></pre>
  
  <p>In console I am getting this:</p>
  
  <pre><code>arithmetic issue
  exception
  Exception in thread "main" java.lang.ArithmeticException
      at testing.ExceptionHandling.main(ExceptionHandling.java:15)
  </code></pre>
  
  <p>But why it gets printed finally block statement first and then catch block statement? It should print catch block statement first and then finally block statement.</p>