Back To Java Exceptions Index
//program to display description of exception public class exceptiondescription { public static void main(String[] args) { int d,a; try{ d=0; a=42/d; System.out.println("this will not be printed"); } catch(ArithmeticException e) { System.out.println("Exception : " + e); } System.out.println("After catch statement"); } }