In the below program,I have some doubts on polymorphism concept i.e; while call by Reference
Here I am creating one super class as A and subclass as B.I am using one more class as "HelloAll" for accessing these two class A and B.
First i am creating the Class 'A' object and than creating one reference type as 'B'. And then assigning the object of A class to reference type of subclass as B.
Here depend on the polymorphism concept it must be access the object of 'A' class by using the 'B' class reference type.But it is giving the Run time error.