aspose file tools
The moose likes Associate Certification (SCJA,OCAJ 5/6) and the fly likes some questions, please answer it Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Associate Certification (SCJA,OCAJ 5/6)
Reply Bookmark "some questions, please answer it" Watch "some questions, please answer it" New topic
Author

some questions, please answer it

ishan kalra
Ranch Hand

Joined: Dec 31, 2005
Posts: 30
hi,

i have encountered some questions, please tell me the exact answers

13.Which two techniques can be used to provide polymorphic behavior? Choose two

�Extending a class and adding a new method
�Implementing two interface in same class
�Extending the class and overriding a existing method
�Implementing a interfaces with several different classes


i am sure about 3rd option what other ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56179
    
  13

What are your answers? We don't do people's homework for them here, but you can get help with doing it yourself.

Start by taking your best shot at the answers.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4967

The word polymorphic means many forms (poly = many, mophic = forms).

So, polymorphism happens when an object can take on many forms. It really has to do with the instance that is created.

So, a person is a mammal, and an animal - that's two forms they can take on. A person can also be a spouse - that's another form they can take on. A person can be a dentist or a programmer - those are other forms.

In this scenario, if person were a class, maybe mammal would be a superclass, and perhaps animal would be an ancestor class. Spouse, programmer and dentist all seem like roles to me, so those might be modelled as interfaces.

So, extending a class, or implementing an interface, are ways that an instance of a subclass or implementing class can be polymorphic. That's what polymorphism is all about. Now, how that applies to your question is another story.

-Cameron McKenzie


Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: some questions, please answer it
 
Similar Threads
threads
jsp:setProperty with java.util.Date
Thread
serialVersionUID
interface