[Advanced-java] OOP's Question
jaz at zukowski.net
jaz at zukowski.net
Fri Apr 27 07:14:01 PDT 2007
This is easy to answer. It is called println. Add one to each of the
methods and see which one is called.
As far as Why.... Isn't that what homework is for, so you learn something?
J
Quoting "G.N.V. Jayprakash" <gnvjp at hotmail.com>:
>
> Hi,
> I have a question in Object Oriented Programming:
>
> A extends B. B extends C. There is a public method methodA()
> implemented in C. methodA() is also overridden in A.
>
> There is a flow starting from A from preProcessRequest()
> implemented in A. preProcessRequest() is also implemented in B.
>
> Now preProcessRequest() in A invokes super.preProcessRequest(). The
> control goes to the preProcessRequest() in B.
> preProcessRequest() method implementation in B invokes methodA().
>
> Now the question is: Will the methodA() implemented in C will be
> invoked or the methodA() implemented in A will be invoked? Why?.
>
More information about the Advanced-java
mailing list