Page 1 of 1

Suppose Exception2 is derived from Exception1. Analyze the following code: ery ( statement1; statement 2/ statement3; }

Posted: Fri Jul 01, 2022 5:46 am
by answerhappygod
Suppose Exception2 Is Derived From Exception1 Analyze The Following Code Ery Statement1 Statement 2 Statement3 1
Suppose Exception2 Is Derived From Exception1 Analyze The Following Code Ery Statement1 Statement 2 Statement3 1 (29.68 KiB) Viewed 35 times
Suppose Exception2 is derived from Exception1. Analyze the following code: ery ( statement1; statement 2/ statement3; } catch (Exceptionis ex1) ( J catch (Exception2s ex2) { > O The program has a compile error because these two catch blocks are in wrong order. O If an exception of the Exeception2 type occurs, this exception is caught by the first catch block. O The program has a runtime error because these two catch blocks are in wrong order. O If an exception of the Exeception2 type occurs, this exception is caught by the second catch block. pts