Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin


Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am preparing for scjp 5. I have read many books(Complete Reference, Khild Mughal, Phillip-Heller, K&B) on java. And now I have a confusion.
In Complete Reference and Khaliad Mughal, Overloading is also Polymorphism, but in "Complete Java 2 Certification- Phillip Heller ", writer write strictly that overloading is not polymorphism. I have read Java Specification. In specification, overriding is polymorphism(that is) but about overloading did not write anything.

Group, Please clear my dought, that "Is overloading polymorphism or NOT"

Thanks in advance.
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Polymorphism is the way of method binding at run time. That applies to overridden methods only. Overloaded methods are selected at the compile type on behalf of argument passed to the method.

No overriding of method, no polymorphism.

I find verbose definition of Polymorphism as :

In object-oriented programming, polymorphism (from the Greek meaning "having multiple forms") is the characteristic of being able to assign a different meaning or usage to something in different contexts - specifically, to allow an entity such as a variable, a function, or an object to have more than one form.

In C++, overloading is too called Polymorphism!
One liner definition as I recall "One name multiple form"

Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic