Method overloading:
1. Writing two or more methods with the same name but with different signatures is called method overloading.
2. Method overloading is done in the same class.
3. In method overloading, method return type can be the same or different.
4. JVM decides which method is called depending on the difference in the method signatures.
5. Method overloading is done when the programmer wants to extend the already available feature.
Method overriding:
1. Writing two or more methods with the same name but with same signatures is called method overriding.
2. Method overriding is done in the super and sub classes.
3. In method overriding, method return type should also be the same.
4. JVM decides which method is called depending on the data type (class) of the object used to call the method.
5. Method overloading is done when the programmer wants to provide a different implementation (body) for the same feature.