title: Overriding toString() in Exception Handling
body: <pre><code>public class ExcepHand  {
      public String toString()
      {
          return "Exception Occured";
      }
      public static void main(String args[])
      {
          int a=10;
          int b=0;
          try
          {
              int c=a/b;
          }
          catch(ArithmeticException e)
          {
              System.out.println(e);
          }
      }
  }
  </code></pre>
  
  <p>This gives me an output <code>java.lang.ArithmeticException: / by zero</code>. I would like to know why the <code>toString()</code> method is not overridden. If it is possible to do so, pls tell me how to do it.</p>