Menu
Topics Index
...
`


Methods Overiding, Overloading >
Siva Nookala - 14 Mar 2016
The method overloading and method overriding are two different ways of achieving polymorphism. Both of them are very useful concepts required to solve the programming problems.

The differences between method overloading and method overriding are:
Method Overloading Method Overriding
This is compile time polymorphism. i.e. which method needs to be called is decided at the compile time itself. This is run time polymorphism. i.e. which method needs to be called will be decided only at run time.
The method signature is not same. The method name is same, but the parameter types and the return type are different. The method signature is exactly the same. The method name, the parameter types and the return type have to be same.
We can implement this concept with only one class. We need at least two classes, one extending from the other to implement this concept. i.e. We need inheritance, to override a method.

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App