File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes 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 "Polymorphism" Watch "Polymorphism" New topic


Santana Iyer
Ranch Hand

Joined: Jun 13, 2005
Posts: 335
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

Joined: Oct 20, 2006
Posts: 43
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

Joined: Aug 15, 2006
Posts: 165
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).

Inquisition: open-source mock exam simulator for SCJP and SCWCD
I agree. Here's the link:
subject: Polymorphism
jQuery in Action, 3rd edition