KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test38


1
2 public class Test38 {
3
4     public static void main(String JavaDoc [] args){
5         Test38 t = new Test38();
6         t.run();
7     }
8
9     public void run (){
10         Inner1 in1 = new Inner1();
11         in1.run();
12     }
13
14     public class Inner1 {
15         
16         public void run(){
17             System.out.println("Smile from Inner1");
18             Inner2 in2 = new Inner2();
19             in2.run();
20         }
21     }
22     
23     public class Inner2 {
24         
25         public void run(){
26             System.out.println("Smile from Inner2");
27         }
28     }
29 }
30
Popular Tags