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