blob: 17855518c8771ab02dc6be8db03fcfee9cbb5556 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package test1;
public class Handler {
public int p;
public Handler() {
p = 3;
}
public int m1(int i) {
p = 1;
try {
try {
if (i < 0)
throw new IndexOutOfBoundsException();
else if (i == 0)
throw new ClassNotFoundException();
}
catch (IndexOutOfBoundsException e) {}
}
catch (ClassNotFoundException e) {}
return p;
}
public int test() {
return m1(1) + m1(0) + m1(-1);
}
}
|