KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > inheritance > Parent


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