wood burning stoves
The moose likes Beginning Java 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Polymorphism " Watch "Polymorphism " New topic


jose chiramal
Ranch Hand

Joined: Feb 12, 2010
Posts: 266
Can i say overloading as a form of polymorphism ? I know of the below three forms of polymorphism :
Method overriding
– Methods of a subclass override the methods of a
● Method overriding (implementation) of the abstract
– Methods of a subclass implement the abstract methods
of an abstract class
● Method overriding (implementation) through the
Java interface
– Methods of a concrete class implement the methods of
the interface

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45302
I would say, no, overloading doesn't mean polymorphism.
marc weber

Joined: Aug 31, 2004
Posts: 11343

Overloaded methods have different method signatures, making them entirely separate methods. So overloading is not polymorphism.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
Ulrika Mingle

Joined: Feb 15, 2010
Posts: 6
jose chiramal wrote:Can i say overloading as a form of polymorphism ?

Sure there are 4 kinds of polymorphisms in the Java type system: Overloading, overriding, coersion and generics.
Charles Owen
Ranch Hand

Joined: Aug 31, 2009
Posts: 61
Polymorphism is basically Greek for "many forms." In OOP, it basically means a type or object can take on many forms. A parent class can take on the form of a derived class and vice versa. For example, you could have a Animal base class, and a Tiger derived class.

Henry Wong

Joined: Sep 28, 2004
Posts: 20370

Personally, I would say no -- that overloading is not really polymorphism. But, there are many definitions. And I have seen some sites that say yes, that it is a certain type of polymorphism.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
I agree. Here's the link: http://aspose.com/file-tools
subject: Polymorphism
jQuery in Action, 3rd edition