@@ -0,0 +1,586 @@
+class A%7B%0A%09void call()%0A%09%7B%0A%09%09System.out.println(%22Version A%22);%0A%09%7D%0A%7D%0Aclass B extends A%7B%0A%09void call()%0A%09%7B%0A%09%09System.out.println(%22Version B%22);%0A%09%7D%0A%7D%0Aclass C extends B%7B%0A%09void call()%0A%09%7B%0A%09%09System.out.println(%22Version C%22);%0A%09%7D%0A%7D%0A%0Aclass Demoridding%7B%0A%09%0A%09public static void main(String %5B%5D args)%0A%09%7B%0A%09%09//Constructor are Called super to sub class%0A%09%09A obj_1 = new A();%0A%09%09B obj_2 = new B();%0A%09%09C obj_3 = new C();%0A%09%09//Make a referene Variable of Class A%0A%09%09//a superclass reference variable can refer to a subclass object%0A%09%09A r;%0A%09%09r = obj_1;%0A%09%09r.call();%0A%09%09r = obj_2;%0A%09%09r.call();%0A%09%09r = obj_3;%0A%09%09r.call();%0A%09%7D%0A%09%0A%7D%0A

Create Demoridding.java