Question: Suppose Exception 2 is derived from Exception 1 . Analyze the following code:If an exception of the Exeception 2 type occurs, this exception is caught

Suppose Exception2 is derived from Exception1. Analyze the following code:If an exception of the Exeception2 type occurs, this exception is caught by the second catch block.The program has a compile error because these two catch blocks are in wrong order.If an exception of the Exeception2 type occurs, this exception is caught by the first catch block.The program has a runtime error because these two catch blocks are in wrong order.
Suppose Exception 2 is derived from Exception 1 .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!