KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test75


1 public class Test75{
2
3     public static void main(String JavaDoc [] args){
4         Test75 t75 = new Test75();
5         t75.run(5);
6     }
7     
8     public void run(final int x){
9         class MyHelper1{
10         
11             public void action(){
12                 
13                 class MyHelper2 {
14                     public void action(){
15                         System.out.println(x);
16
17                         class MyHelper3{
18                             public void action(){
19                                 System.out.println(x*x);
20                                 class MyHelper4{
21                                     public void action(){
22                                         System.out.println(x*x*x*x*x);
23                                     }
24                                 };
25                                 MyHelper4 m4 = new MyHelper4();
26                                 m4.action();
27                             }
28                         };
29                         MyHelper3 m3 = new MyHelper3();
30                         m3.action();
31                     }
32                 };
33                 MyHelper2 m2 = new MyHelper2();
34                 m2.action();
35             }
36         };
37         MyHelper1 m1 = new MyHelper1();
38         m1.action();
39     }
40 }
41
Popular Tags