KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test21


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 Test21 {
18
19     public static void main (String JavaDoc [] args){
20         Test21 t21 = new Test21();
21         t21.run();
22     }
23
24     public void run(){
25         new HelperWithParams (2, 3) {
26             public void action(){
27                 System.out.println("Smile Anon");
28             }
29         }.action();
30     }
31 }
32
Popular Tags