INTERVIEW QUESTIONS
J2EE
DETAILS
Question: What is meant by polymorphism in java?How can we achieve polymorphism?Explain with an example.
Answer: Any thing that exist in more than one form is known as the polymorphism.
Example of ploymorphism. 1. Abstract class(Because, In the abstract super class its define some general information, In the subclass it must be override. It it's many form.(It supports single Inheritance))
2. Interface( same as above but supporting multiple inheritance ) 3. Method overloading( In the class having a method is same return type but different signature )
|
Question:
What is meant by polymorphism in java?How can we achieve polymorphism?Explain with an example.
Answer:
Any thing that exist in more than one form is known as the polymorphism.
Example of ploymorphism. 1. Abstract class(Because, In the abstract super class its define some general information, In the subclass it must be override. It it's many form.(It supports single Inheritance))
2. Interface( same as above but supporting multiple inheritance ) 3. Method overloading( In the class having a method is same return type but different signature )
Source: CoolInterview.com
Answered by: sivachandran | Date: 1/21/2008
| Contact sivachandran
Ex:Consider Birds like crow, parrot, peacock etc.. all r different but coming under a common name called birds likewise polymorphism is nothing but one in many form Source: CoolInterview.com
Answered by: Madhan | Date: 8/23/2009
| Contact Madhan
Q:what is difference between string, stringbuffer and stringbuilder? Source: CoolInterview.com
Answered by: veeraiah | Date: 4/18/2010
| Contact veeraiah
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|