Question: Suppose that statement2 causes an exception in the following try-catch block: try { statement1; statement2; statement3; } catch (Exception1 ex1) { } catch (Exception2 ex2)
Suppose that statement2 causes an exception in the following try-catch block: try { statement1; statement2; statement3; } catch (Exception1 ex1) { } catch (Exception2 ex2) { } statement4; } statement5; a) If no exception occurs, will statement4 or statement5 be executed? b)if the exception is of type exception1,will statement4 or statement5 be executed? c))if the exception is of type exception2,will statement4 or statement5 be executed?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
