File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes OO, Patterns, UML and Refactoring and the fly likes polymorphism and overloading 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 » Engineering » OO, Patterns, UML and Refactoring
Bookmark "polymorphism and overloading" Watch "polymorphism and overloading" New topic

polymorphism and overloading

ali farid
Ranch Hand

Joined: Aug 26, 2000
Posts: 60

Is overloading by any means concerned with polymorphism ?
Avijeet Dash
Ranch Hand

Joined: Jan 21, 2001
Posts: 148
Polymorphisim is simply 'same name and many forms'.
static polymorphism:
It can be in the form of operator overloading (c++, or '+' for string concatenation in Java ). It can be function overloading i.e. same function name with different input argumant types in the same class or sub classes.
dynamic polymorphism:
function overriding can be done only in subclasses, which means same function name and input arguments and the implementation is different.
Piotr Aniola

Joined: Feb 20, 2001
Posts: 3
The generally accepted definition of polymorphism is:
"Ability to hide multiple implementations behind a single interface."
So I agree function overloading is polymorphism. So is operator overloading. Any kind of overloading will be polymorphic because the same interface is used to refer to different behaviours.

Piotr Aniola
Mark Savory
Ranch Hand

Joined: Feb 08, 2001
Posts: 122
Overloaded functions do not represent the same interface, so maybe your definition is refering to "dynamic polymorphism" mention by Avijeet in the previous message.
jQuery in Action, 2nd edition
subject: polymorphism and overloading
Similar Threads
Method Overloading and overriding
is overloading example of static or dynamic polymorphism
Dan's Mock #4 Q. 25
polymorphism,overloading and overiding seems to be the same thing for me
Overloading is Polymorphism?