Two or more methods can have the same name inside the same class if they accept different arguments . This feature is known as method overloading. Method overloading is achieved by either: changing the number of arguments. or changing the data type of arguments.