Summary
In this chapter, we started our discussion on methods by stating that methods are simply code blocks that are given a name for ease of reference. Methods are important because they enable us to abstract away the implementation, while at the same time helping us to avoid unnecessary code duplication.
There are two parts to a method: the method definition (or declaration) and the method call (or invocation). The method definition declares (among other things) the method name, the input parameters, and the return type. The method name and the parameter types (including their order) constitute the method signature. The method call passes down the arguments (if any) to be used as inputs in the method. The return value from a method (if there is one) can be captured by assigning the method call to a variable.
Method overloading is where the same method name is used across several different methods. What distinguishes the various methods is that they have different signatures...