KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test25


1 public class Test25 {
2
3     private int x = 9;
4
5     private void go(){
6         System.out.println("hi");
7     }
8     
9     public static void main (String JavaDoc [] args){
10         Test25 t = new Test25();
11         t.run();
12     }
13
14     public void run(){
15         TestInner1 t = new TestInner1();
16         t.run();
17     }
18     
19     class TestInner1 {
20         public void run(){
21             System.out.println("Smile: Inner1: "+x);
22             go();
23             TestInner2 t2 = new TestInner2();
24             t2.run();
25         }
26
27         class TestInner2 {
28             public void run(){
29                 System.out.println("Smile: Inner2");
30             }
31         
32         }
33         
34         
35         
36     }
37
38 }
39
Popular Tags