Ask Question
5 February, 08:14

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

+3
Answers (1)
  1. 5 February, 11:12
    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?
Find an answer to your question ✅ “Where does execution resume after an exception has been thrown and caught? ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers