• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Polymorphism

 
Ranch Hand
Posts: 335
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is overloading also ploymorphism.

I thought polymorphism is something happens at runtime.
So overriding is only way for polymorphism.

But I read on some sites that overloading and overriding both are polymorphism.
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

By..Vishal Patel:

Well..polymorphism is something related to run time binding.
Another ting we can say abt polymorphism is..which shows a polymorphic behaviour.
Overloading..means methods with same name but different signatures...
It means that method name is showing polimorphic behaviour...

And thats y we can say its polymorphism.


[ October 20, 2006: Message edited by: Vishal K Patel ]
 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess in this forum we're interested in what definition of polymorphism is used for the SCJP exam. K&B explicitly say that "polymorphism applies to overriding, not to overloading". They also say that polymorphism is "the OO principle most closely with allowing a single object to be seen as many types".

Some people also view overloading and generics as being facilities for polymorphism (sometimes called "ad hoc" and "parametric" polymorphism respectively).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic