Thanks for your answer. I understand what you mean. But the problem is in the book there are theses solutions:
and in the explanation to this question:
Purpose: To determine whether exception-handling code for errors will execute.
Explanation: We know that typically errors shouldn't be handled programmatically
and that they should be left for the JVM to take care of. Also, you can't be sure that
error-handling code for all the errors will execute. For example, error-handling code
for StackOverflowError may execute but (as the name suggests) may not execute for
Is this an error in the book? I don't know. From the above explanation StackOverflowError, the answer to the purpose is: exception-handling code for errors will execute (for StackOverflowError surely). In this case, why she choose b as answer? Who knows?