*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes What is polymorphism? 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 "What is polymorphism?" Watch "What is polymorphism?" New topic
Author

What is polymorphism?

vvus bharadwaj
Ranch Hand

Joined: Apr 28, 2012
Posts: 38
What is polymorphism exactly.I came to know that polymorphism only applies to overiding and polymorphism not applies to static and overloaded methods.What do you mean by this statement.
saloni jhanwar
Ranch Hand

Joined: Feb 09, 2012
Posts: 583

vvus bharadwaj wrote:What is polymorphism


Polymorphism means one thing have many forms.

vvus bharadwaj wrote: polymorphism only applies to overiding and polymorphism not applies to static and overloaded methods.What do you mean by this statement.


Polymorphism comes in picture only when you do method overriding.

Overload is not overriding, so how will you implement polymorphism there ?

Because you can't override static method so how will you achieve polymorphism there ?




Tell the difficulties that i am difficult.
Tess Jacobs
Ranch Hand

Joined: Feb 07, 2012
Posts: 71
    
    3
Polymorphism is the ability of an object to take on many forms.

Polymorphism allows a method call to have many possible resolutions.

Run time polymorphism can be implemented through overriding since method calls are resolved at run time.

Compile time polymorphism can be implemented through overloading since method calls are resolved at compile time.
Keshav Dussal
Greenhorn

Joined: Apr 01, 2012
Posts: 2
Polymorphism in the context of object-oriented programming, is the ability to create a variable, a function, or an object that has more than one form.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

i dont know how to explain ploymorphism. but definitely one of the key player of oops/design pattern ;)
 
GeeCON Prague 2014
 
subject: What is polymorphism?