Overloading vs Overriding

Overloading
Overloading occurs when two or more Methods in one class have same Method name but different parameters.

Overriding
Overriding means having two methods with same name and parameters(i.e., same signature)  one of the method in parent class and the other one in child class.

*** Here same signature means having the same modifier, return type, method name and parameters.

Post a Comment

0 Comments