Predict the output of the following program.
Explanation: ‘throw’ keyword is used to explicitly throw an exception.
finally block is always executed even when an exception occurs.
Call to method C() throws an exception. Thus, control goes in catch block of method B() which again throws an exception. So, control goes in catch block of method A().
Quiz of this Question
Please comment below if you find anything wrong in the above post