KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test55


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 Test55{
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                 System.out.println(x);
21             }
22         };
23     }
24 }
25
Popular Tags