KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test85


1 class Super2 {
2     public int x = 8;
3 }
4
5 public class Test85 extends Super2 {
6     
7     public int x = 9;
8     
9     public static void main(String JavaDoc [] args){
10         Test85 t85 = new Test85();
11         t85.run();
12     }
13
14     public void run(){
15         Inner in = new Inner();
16         in.run();
17     }
18
19     class Inner {
20         public void run(){
21             System.out.println("Test85.super.x: "+Test85.super.x);
22             System.out.println("Test85.this.x: "+Test85.this.x);
23         }
24     }
25 }
26
Popular Tags