While catching exeption why do we use the Exception's subclasses as the o/p clearly gives us the exact exception? : <pre><code>public class Test{  
  public static void main(String args[]){  
  try{  
   int data=25/0;  
   System.out.println(data);  
  }  
  catch( ArithmeticException e)
       {
         System.out.println(e);
       }  
  }  
}  
</code></pre>

<p>o/p:java.lang.ArithmeticException: / by zero</p>

<p>In this code even if I catch the exception using the <strong>ArithmaticException</strong> class or directly the <strong>Exception</strong> class, the o/p is the same. Then why do we use the subclasses in different catch statements instead of directly using <strong>Exception</strong> class everytime?</p>
