method overloading in Java

Method overloading let us reuse the same method name in a class, but with different arguments (and optionally, a different return type). 
The rules are simple,
* Overloaded methods MUST change the argument list.
* Overloaded methods CAN change the return type.
* Overloaded methods CAN change the access modifier.
* Overloaded methods CAN declare new or broader checked exceptions.
* A method can be overloaded in the same class or in a subclass.

The order that Java uses to choose the right overloaded method,
Rule | Example of what will be chosen for f(1,2)
----- | -----
Exact match by type | public String f(int i, int j) {} 
Larger primitive type | public String f(long i, long j) {} 
Autoboxed type | public String f(Integer i, Integer j) {} 
Varargs | public String f(int... nums) {}