KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > inheritance > Child


1 package test.inheritance;
2
3 public class Child extends Parent {
4     public static final String JavaDoc HELLO_MSG = "Hello from the Child class";
5     public static final String JavaDoc OVERLOAD_MSG = "The Child got ";
6
7     public String JavaDoc normal()
8     {
9         return HELLO_MSG;
10     }
11
12     public String JavaDoc overloaded(int i)
13     {
14         return OVERLOAD_MSG + i;
15     }
16 }
17
Popular Tags