KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > STest5


1 class Super1 {
2     public int x = 9;
3 }
4
5 public class STest5 extends Super1{
6
7     public int x = 8;
8
9     public static void main(String JavaDoc [] args){
10         STest5 st5 = new STest5();
11         st5.run();
12     }
13
14     public void run(){
15         System.out.println("this x: "+this.x);
16         System.out.println("super x: "+super.x);
17     }
18 }
19
Popular Tags