• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

query regarding overriding

 
Chaitanya Vivek
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For java tiger (Java 5.0), the answer is yes.
[ July 18, 2006: Message edited by: Barry Gaunt ]
 
wise owen
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
COVARIANT RETURN TYPES in Java 5.0




(Added Java 5.0)
[ July 18, 2006: Message edited by: Barry Gaunt ]
 
Rohit Nath
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for your kind replies.
I got clarification.

regards,
chaitanya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic