KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test22


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