<HTML>
What letters are written to the standard output with the following code?
1.����class Unchecked {
2.�������public static void main(String[] args) {
3.����������try {
4.�������������method();
5.����������} catch(Exception e) {}
6.�������}
7.�������static void method() {
8.����������try {
9.�������������wrench();
10.������������System.out.println("a");
11.���������}catch(ArithmeticException e) {
12.������������System.out.println("b");
13.���������}finally {
14.������������System.out.println("c");
15.���������}
16.���������System.out.println("d");
17.������}
18.������static void wrench() {
19.���������throw new NullPointerException();
20.������}
21.���}
Select all valid answers(correct answers are blue):
a.����
"a"
b.����
"b"
c.����"c"
d.����
"d"
Here's what I thought... that both c and d would be printed, because the program would execute line 16 after the last finally block. Why is this so?
Thanks in advance,
Barbara</BODY>
</HTML>
[This message has been edited by Barbara Dyer-Bennet (edited September 16, 2000).]
[This message has been edited by Barbara Dyer-Bennet (edited September 16, 2000).]
[This message has been edited by Barbara Dyer-Bennet (edited September 16, 2000).]
[This message has been edited by Barbara Dyer-Bennet (edited September 16, 2000).]