It's not a secret anymore!*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Polymorphism" Watch "Polymorphism" New topic
Author

Polymorphism

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).


Matt
Inquisition: open-source mock exam simulator for SCJP and SCWCD
 
wood burning stoves
 
subject: Polymorphism
 
Similar Threads
Method Overloading and overriding
Polymorphism
Variable Polymorphism
polymorphism,overloading and overiding seems to be the same thing for me
overriding and polymorphism