KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > T125r2


1
2 class Super {
3     Super() { printThree(); }
4     void printThree() { System.out.println("three"); }
5 }
6 class T125r2 extends Super {
7     int three = (int)Math.PI; // That is, 3
8
public static void main(String JavaDoc[] args) {
9         T125r2 t = new T125r2();
10         t.printThree();
11     }
12     void printThree() { System.out.print(three); }
13 }
14     
Popular Tags