Using Method Overloading : Method Overloading « Class Definition « Java Tutorial

A method's name with the types and sequence of the parameters form the method's signature

public class MainClass {

  public void print(int a) {

  public void print(String a) {


5.5.Method Overloading
5.5.1.Method Overloading
5.5.2.Using Method Overloading
5.5.3.Pass long parameters to overloading method
5.5.4.Primitives and overloading
5.5.5.Overloading based on the order of the arguments
5.5.6.Demonstration of both constructor and ordinary method overloading
5.5.7.Using overloaded methods to print array of different types
5.5.8.Methods with differing type signatures are overloaded - not overridden.