• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

What is polymorphism?

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 583
Firefox Browser Notepad Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ?



 
Ranch Hand
Posts: 71
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i dont know how to explain ploymorphism. but definitely one of the key player of oops/design pattern ;)
 
There is no beard big enough to make me comfortable enough with my masculinity to wear pink. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic