KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test23


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 Test23 {
18
19     public static void main (String JavaDoc [] args){
20         Test23 t23 = new Test23();
21         t23.run();
22     }
23
24     public void run(){
25         class MyHelper1 extends HelperWithParams {
26
27             public MyHelper1(){
28             }
29             public MyHelper1(int x, int y){
30             }
31             public void action(){
32                 System.out.println("Smile Anon");
33             }
34         };
35         new MyHelper1(2, 3).action();
36     }
37 }
38
Popular Tags