posted 22 years ago
Veena
The variable a is declared as a variable of type A, so it can refer to an object of type A or any of its subclasses. In this case it is refering to an object of type D, a D object is an A object becasue it extends B which in turn extends A. So a D object is a D object, is a B object and is a A object also. However, since class B implements interface E, a B object, and a D object by inheritance, is also an E object.
hope that explains it for you