Should ArithmeticException appear before RunTimeException in the list of catch blocks?

A good answer might be:

Yes.

If RunTimeException appeared first, then its catch block would catch all RunTimeExceptions, including ArithmeticExceptions.


Compact Diagram

A more compact way of showing the hierarchy is:

Exception

    IOException

    AWTException

    RunTimeException
        ArithmeticException
        IllegalArgumentException
            NumberFormatException
        IndexOutOfBoundsException
        Others

    Others

Don't memorize this diagram (for one thing, it is not complete). But look at it to see what it says.

QUESTION 11:

Which should come first in the catch blocks: ArithmeticException or IndexOutOfBoundsException?