/** * Here is an example of method overloading in Java * * @author Dave Slemon * @version v100 */ public class Overloading_Example { static int addThem(int x, int y) { return x + y; } static double addThem(double x, double y) { return x + y; } public static void main(String[] args) { int myNum1 = addThem(8, 5); double myNum2 = addThem(4.1, 6.9); System.out.println("int: " + myNum1); System.out.println("double: " + myNum2); } }