Overloading is the ability to define more than one method with the same name in a class. The compiler is able to distinguish between the methods because of their method signatures.


There are nine different ways the print method of the System.out object can be used:

 print.(Object obj)
 print.(String s)
 print.(boolean b)
 print.(char c)
 print.(char[] s)
 print.(double d)
 print.(float f)
 print.(int i)
 print.(long l)

When you use the print method in your code the compiler will determine which method you want to call by looking at the method signature. For example:

 int number = 9;
 String text = "nine";
 boolean nein = false;

Each time a different print method is being called because the parameter type being passed is different. It's useful because the print method will need to vary how it works depending on whether it has to deal with a String or integer or boolean.


# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z