F. None of the above.
Answer is CE.
Option E is allowed because it isn’t in the same inheritance tree as RuntimeException.
I read the solution on option E but I have no idea why it is a correct answer. StackOverflowError inherits java.lang.Error. I mean, yes they are in the same inheritance tree (Throwable) but checked exception also in that inheritance tree as well. Please help, thanks.
You can't put a catch clause that catches a Superclass above a catch clause that catches a subclass. So in this example the catched exception can't be a Superclass of Runtime exception. StackOverflowError is a subclass of throwable but it isn't in the same branch of the tree as Runtime exception because it is an error. So it is allowed because StackOverflowError isn't a Superclass of Runtime exception.