aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Polymorphism " Watch "Polymorphism " New topic
Author

Polymorphism

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
superclass
● Method overriding (implementation) of the abstract
methods
– 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
Sheriff

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

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
sscce.org
Ulrika Mingle
Greenhorn

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
author
Sheriff

Joined: Sep 28, 2004
Posts: 18103
    
  39


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.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Polymorphism
 
Similar Threads
Interfaces doubt
Abstract classes and Interfaces
some java interview Questions
Static and abstract
Interfaces Cannot have static methods??