KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test49


1 public class Test49{
2     
3     public static void main(String JavaDoc [] args){
4         Test49 t49 = new Test49();
5         t49.run();
6     }
7
8     public void run(){
9         final String JavaDoc s = getString();
10         class MyClass {
11             public void run(){
12                 System.out.println(s);
13                 class MyClass2 {
14                     public void run(){
15                         System.out.println(s);
16                     }
17                 };
18                 MyClass2 mc2 = new MyClass2();
19                 mc2.run();
20             }
21         };
22
23         MyClass m = new MyClass();
24         m.run();
25     }
26
27     public String JavaDoc getString(){
28         return "hello";
29     }
30 }
31
Popular Tags