SiteMap  | About    

Are Polymorphism , Overloading and Overriding similar concepts?

Overloading is the action of defining multiple methods with the same name, but with different parameters.

Overriding means re-defining body of a method of superclass in a subclass to change behaviour of a method.

Which object oriented Concept is achieved by using overloading and overriding?

Polymorphism can be achieved through overriding . As already mentioned above, polymorphism refers to the ability of an object to provide different behaviours (use different implementations) depending on its own nature. Specifically, depending on its position in the class hierarchy.

Method Overloading is unrelated to polymorphism. As mentioned above, it refers to defining different forms of a method . It can be seen as static polymorphism . The decision to call an implementation or another is taken at coding time. Notice in this case the signature of the method must change. (C) 2017    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.