KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test42


1
2 public class Test42 {
3
4     public static void main(String JavaDoc [] args){
5         Test42 t = new Test42();
6         t.run();
7     }
8
9     public Test42(){
10         System.out.println("init for Test42");
11     }
12     
13     public void run (){
14         Inner in = new Inner();
15         in.run();
16     }
17
18     public class Inner extends Test42{
19         
20         public Inner(){
21             this(4);
22         }
23
24         public Inner(int x){
25             super();
26             System.out.println("Second Init Inner");
27             run();
28         }
29         
30         public void run(){
31             System.out.println("Smile");
32         }
33     }
34
35     public class Inner2 extends Inner {
36         public Inner2(){
37             super();
38             System.out.println("Init called for Inner2");
39         }
40     }
41 }
42
Popular Tags