-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
50 lines (34 loc) · 869 Bytes
/
Copy pathTest.java
File metadata and controls
50 lines (34 loc) · 869 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package leon.algorithm;
import java.util.Date;
public class Test extends Date{
/**
* @param args
*/
public static void main(String[] args) {
//Permutation p= new Permutation();
// System.out.println(p.str); // not visible
new Test().test();
StringBuffer s = new StringBuffer();
StringBuilder sb = new StringBuilder();
System.out.println(new Test().testFinallyReturn());//0
}
public void test(){
System.out.println(super.getClass().getName());
System.out.println(Test.class.getSuperclass().getName());
}
public int testFinallyReturn(){
int x=0;
try{
//System.out.println(23 / x);
//throw new Exception();
return x;
}catch(Exception e){
e.printStackTrace();
}finally{
System.out.println("finally..");
x++;
}
System.out.println("testing");//will not execute code here
return x;
}
}