title: Multiple overloaded methods: Does null equal NullPointerException?
body: <pre><code>public class TestMain {
  
      public static void methodTest(Exception e) {
          System.out.println("Exception method called");
      }
  
      public static void methodTest(Object e) {
          System.out.println("Object method called");
      }
  
      public static void methodTest(NullPointerException e) {
          System.out.println("NullPointerException method called");
      }
  
      public static void main(String args[]) {
          methodTest(null);
      }   
  }
  </code></pre>
  
  <p>Output: NullPointerException method called</p>