Q46
What will be the step of the interpreter in a jump statement when an exception is thrown?
A.
The interpreter stops its work
B.
The interpreter throws another exception
C.
The interpreter jumps to the nearest enclosing exception handler
AnswerD.
None of the mentioned
Answer: Option C
Solution
Answer: Option C
Solution:
When an exception is thrown in a jump statement, the interpreter jumps to the nearest enclosing exception handler, which may be in the same function or up the call stack in an invoking function.