Overloading is the definitions of multiple subroutines or methods using the same name. However, each method has a different combination of parameters. Assume class X and Y are not related, then the following function prototypes are examples of overloading:
The compiler selects the correct function to use based on the arguments of an invocation.