File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Polymorphism

 
Santana Iyer
Ranch Hand
Posts: 335
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Vishal K Patel
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
Matt Russell
Ranch Hand
Posts: 165
  • 0
  • Mark post as helpful
  • send pies
  • 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).
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic