Question: Question : Tracing Exception Handling Use the pseudocode below. Which statements will be executed if: 1.no exceptions are thrown 2.an ExceptionA is thrown in statement8

Question : Tracing Exception Handling

Use the pseudocode below. Which statements will be executed if:

1.no exceptions are thrown

2.an ExceptionA is thrown in statement8

3.an ExceptionB is thrown in statement8

4.an ExceptionC is thrown in statement8

5.an ExceptionD is thrown in statement8

public void methodA() {

statement1

try {

methodB();

statement2

} catch(ExceptionB ex) {

statement3

} catch(ExceptionC ex) {

statement4

} finally {

statement 5

}

statement6

}

public void methodB() {

statement7

try {

statement8 // this statement generates the exception when one is thrown

statement9

} catch(ExceptionA ex) {

statement10

} catch(ExceptionB ex) {

statement11

} finally {

statement12

}

statement13

}

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 Databases Questions!