Output of the following program is as per below:
Output
ExceptionHandlingExample.java:10: error: exception ArithmeticException has already been caught
catch(ArithmeticException ex){System.out.println(ex);}
^
1 error
Explanation
ArithmaticException is the subclass of Exception. Therefore, it can not be used after Exception. Since Exception is the base class for all the exceptions, therefore, it must be used at last to handle the exception. No class can be used after this.