1class Person {
2 void walk() {
3 System.out.println(“Can Run….”);
4 }
5}
6class Employee extends Person {
7 void walk() {
8 System.out.println(“Running Fast…”);
9 }
10 public static void main(String arg[]) {
11 Person p = new Employee(); //upcasting
12 p.walk();
13 }
14}