Ask Question
19 January, 08:42

Where does execution resume after an exception has been thrown and caught?

+4
Answers (1)
  1. 19 January, 12:07
    0
    The execution resumes in the finally block if one exists or otherwise from the next statement following the try ... catch block.

    Explanation:

    Once an exception has been thrown and caught in the code, the execution continues with the statements in the finally block if one exists. If there is no finally block defined then execution resumes from the next statement following the try ... catch block. For example:

    try{

    //An exception is raised

    }

    catch (Exception e) {

    //Exception is handled

    }

    System. out. println ("After try ... catch");

    In this code segment, the next statement to be executed after catch is the System. out. println ();
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Where does execution resume after an exception has been thrown and caught? ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers