Professional Documents
Culture Documents
When a method in a class having the same When a method in a class having the same
method name with same arguments is said to be method name with different arguments is said
method overriding. to be method overloading.
In overriding, there is relationship between a In overloading, there is a relationship between
super class method and subclass method. methods available in the same class
Overriding must have same signature. Overloading must have different method
signatures
In overriding, subclass method replaces the In overloading, separate methods share the
super class. same name
package developer;
import java.util.Scanner;