posted 24 years ago
hi
try {
tryThis();
return;
} catch (IOException x1) {
System.out.println("exception 1");
return;
} catch (Exception x2) {
System.out.println("exception 2");
return;
} finally {
System.out.println("finally");
}
What will appear in the standard output if tryThis() throws a
NumberFormatException?
Select the one right answer.
a.Nothing
b."exception 1", followed by "finally"
c."exception 2", followed by "finally"
d."exception 1"
e."exception 2"
can anybody explain how the ans is c
since the NumberFormat Exception is not specified in any of the catch blocks.
thanx
sheri