[Advanced-java] OOP's Question

G.N.V. Jayprakash gnvjp at hotmail.com
Fri Apr 27 07:07:59 PDT 2007


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?.
 
Thanks & Regards,Jayprakash
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /lists/advanced-java/attachments/20070427/968e671d/attachment.html 


More information about the Advanced-java mailing list