If a try statement has catch blocks for both ClassCastException and RuntimeException, then which of the following statements is correct?
A.
ClassCastException is a subclass of RuntimeException, so it must appear first in any related catch blocks.
If RuntimeException was to appear before ClassCastException, then the ClassCastException block would be considered unreachable code,
since any thrown ClassCastException is already handled by the RuntimeException catch block.
Option A is correct.