KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test62


1
2 public class Test62 {
3
4     public static void main(String JavaDoc [] args){
5         Test62 t = new Test62();
6         t.run();
7     }
8
9     public void run (){
10         Inner in = new Inner();
11         in.run();
12     }
13
14     public class Inner {
15         
16         public void run(){
17             System.out.println("Inner - level1");
18             Inner2 in2 = new Inner2();
19             in2.run();
20         }
21
22         public class Inner2 {
23             public void run(){
24                 System.out.println("Inner - level2");
25                 Inner3 in3 = new Inner3();
26                 in3.run();
27             }
28             
29             public class Inner3 {
30                 public void run(){
31                     System.out.println("Inner - level3");
32                 }
33                 
34             }
35         }
36     }
37 }
38
Popular Tags