Compilation fails because
ArithmeticException has already been caught.
ArithmeticException is a subclass of
java.lang.Exception, by time the
ArithmeticException has been specified it has already been caught by the
Exception class.
If ArithmeticException appears before Exception, then the file will compile. When catching exceptions the more specific exceptions must be listed before the more general (the subclasses must be caught before the superclasses).