Hi Folks,
What Lam Thai's does is that the
<code>doIt()</code>
is chaining of
<code>super.doIt()</code>, recursively. But that is not the question has been asked.
Let's stick to the question in the current
context :
Originally posted by Micah Holroyd
For this question:
Given classes A, B and C, where B extends A and C extends B and where all classes implement the instance method, void doIt(). How can the doIt() method in A be called from an instance method in C?
Select the one right answer.
(a) doIt();
(b) super.doIt();
(c) super.super.doIt();
(d) this.super.doIt();
(e) A.this.doIt();
(f) ((A)this).doIt();
(g) It is not possible.
The question clearly asks that
How can the doIt() method in A be called from an instance method in C? The question does not mention that the
<code>doIt()</code> has been implimented by a call to
<code>super.doIt()</code> in each of the derived classes.
So the ANSWER IN THE CURRENT CONTEXT IS INDEED (G).
Hope this clears the issue.
Ravindra Mohan.
[This message has been edited by Ravindra Mohan (edited May 10, 2001).]