KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test86


1 class Super4 {
2     public void run(){
3         System.out.println("running in super");
4     }
5 }
6
7 public class Test86 extends Super4 {
8     
9     public int x = 9;
10     
11     public static void main(String JavaDoc [] args){
12         Test86 t86 = new Test86();
13         t86.run();
14     }
15
16     public void run(){
17         Inner in = new Inner();
18         in.run();
19     }
20
21     class Inner {
22         public void run(){
23             System.out.println("Test86.super.run(): ");
24             Test86.super.run();
25             System.out.println("Test86.this.go(): ");
26             Test86.this.go();
27         }
28     }
29
30     public void go(){
31         System.out.println("running in this.go()");
32     }
33 }
34
Popular Tags