- World's Largest Collection of Interview Questions
Start Your Own website Now
Sponsored Links

Interview Questions
Our Services

Get 9,000 Interview Questions & Answers in an eBook.

  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!

    Send your Resume to 6000 Companies

    Question :
    What is meant by polymorphism in java?How can we achieve polymorphism?Explain with an example.
    Contact Contact
    Category J2EE Interview Questions
    Rating (0.3) By 2152 users
    Added on 8/17/2007 1:36:40 PM
    Views 3517
    Rate it!

    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 )

    Posted by: sivachandran    

    Contact sivachandran 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

    Posted by: Madhan    

    Contact Madhan Contact Madhan

    Q:what is difference between string, stringbuffer and stringbuilder?

    Posted by: veeraiah    

    Contact veeraiah Contact veeraiah

    Example of polymorphism.
    1. Method overloading
    2. Method overriding(Dynamic dispatchment method)
    3. Constructor overloading

    Posted by: Pinakin    

    Contact Pinakin Contact Pinakin

    polymorphism means existence of more than one form.
    we can achieve polymorphism in run time as well as compile time.

    overloading is the way to achieve polymorphism at compile time.

    using overriding we can achieve polymorphism in run time.

    Posted by: Athira.V    

    Contact Athira.V Contact Athira.V

    If you have the better answer, then send it to us. We will display your answer after the approval.
    Rules to Post Answers in

  • 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.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

    Related Questions
    View Answer
    can you tell me the steps for how to create and execute and run the Ejb simple stateless session application in websphere application server6.0 and Ide is RAD6.0
    View Answer

    Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here - Best Freshers & Experienced Jobs Website.

    View ALL J2EE Interview Questions

    User Options
    Sponsored Links

    Copyright ©2003-2015, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | C Interview Questions & Answers

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

    Cache = 0 Seconds