JAVA
4. What output will be produced by the following code fragmentunder each of the stated conditions?
a. If No exception is thrown by the review.question()method.
b. If an Exception1 exception is thrown by the review.question()method.
c. If an Exception2 exception is thrown by the review.question()method.
d. If an Exception3 exception is thrown by the review.question()method
{
……
try {
review.question();
}
catch (Exception1 exception)
{
System.out.println(“one caught”);
}
catch (Exception2 exception)
{
System.out.println(“two caught”);
}
finally
{
System.out.println(“finally”); ‘
}
System.out.println(“the end”);
}
Expert Answer
An answer will be send to you shortly. . . . .