Consider the following class hierarchy
class A {/*from www . j a va 2 s . c o m*/ public void m1 () { } } class B extends A { public void m1 () { } } class C extends B{ public void m1 (){ /* //1 ... lot of code. */ } }
Select 2 options
Correct Options are : A B
Note that selection of method to be executed depends upon the actual object class.
So no matter what you do, in class C you can only access C's m1() even by casting this to B or A.
So, this option will not work.
There is no construct like super.super.
So, there is no way you can access m1() of A from C.