KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test54


1 class Helper {
2
3     public static void main(String JavaDoc [] args){
4     }
5
6     public void action(){
7         System.out.println("Helper");
8     }
9 }
10 public class Test54{
11
12     public static void main(String JavaDoc [] args){
13         run(4);
14     }
15     
16     public static void run(final int x){
17         new Helper(){
18         
19             public void action(){
20                 
21                 new Helper() {
22                     public void action(){
23                         System.out.println(x);
24                     }
25                 };
26             }
27         };
28     }
29 }
30
Popular Tags