Difference Between Method Overloading And Method Overriding in Java

Sr. No Method Overloading Method Overriding
1. Two methods are said to be overloaded if and only if both methods are sharing the same name but arguments are different. When child class is not satisfied with the definition of parent class method and wants to give its own definition, so rewriting the same method in the child class is called method overriding.
2. The methods which are having the same name are called overloaded methods. The parent class method which is overridden is called the overridden method.
3. Method overloading is the concept in a single class. Method overriding is a concept at the time of Inheritance.
4. One method does not hide another method. The child class method hides the implementation of the parent class method.
5. The Parameters are different. The parameter must be the same.
6. Return type may or may not be the same. Return type must be same or a type of covariant type.

Share