This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes query regarding overriding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "query regarding overriding" Watch "query regarding overriding" New topic
Author

query regarding overriding

Chaitanya Vivek
Ranch Hand

Joined: May 17, 2006
Posts: 36
Dear All

Is the follwoing scenarios is an example of valid overriding?

where class B extends class A.

thanks
chaitanya

(Made location of methods clearer)
[ July 18, 2006: Message edited by: Barry Gaunt ]
Pavel Kubal
Ranch Hand

Joined: Mar 13, 2004
Posts: 356
For java tiger (Java 5.0), the answer is yes.
[ July 18, 2006: Message edited by: Barry Gaunt ]
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
COVARIANT RETURN TYPES in Java 5.0




(Added Java 5.0)
[ July 18, 2006: Message edited by: Barry Gaunt ]
Rohit Nath
Ranch Hand

Joined: Jun 16, 2006
Posts: 387
Originally posted by Pavel Kubal:
For java tiger, the answer is yes.


Is it? I dont know what should be the answers during interviews...!!
Maybe we need to ask them which version the question is realted to!!!
Wht say?

Thx for the info!
_Rohit


R.N
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Originally posted by Rohit Kharat:


Is it? I dont know what should be the answers during interviews...!!
Maybe we need to ask them which version the question is realted to!!!
Wht say?

Thx for the info!
_Rohit


This forum is about SCJP, not about job interviews. We have a Jobs Discussion forum which often has topics about interviews.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
Yes, in Java 5.0, it is Overriding.

Arun

(added Java 5.0)
[ July 18, 2006: Message edited by: Barry Gaunt ]
Chaitanya Vivek
Ranch Hand

Joined: May 17, 2006
Posts: 36
Thank you all for your kind replies.
I got clarification.

regards,
chaitanya
 
GeeCON Prague 2014
 
subject: query regarding overriding