Classes, Objects, and Enums
In Chapter 7, we learned about methods in Java. After understanding why methods are useful, we learned that there are two parts to methods – the method definition and the method call. We saw that the method definition is the code that’s executed when the method is invoked via the method call. We discussed how method signatures enable method overloading. We also learned how varargs
helps us call a method with zero or more arguments. Finally, we discussed Java’s call by value mechanism, where arguments that are passed to a method are copied in memory. Depending on the type of argument passed, primitive or reference, will have implications as to the effect of the changes made in the called method to those arguments passed from the caller method.
Chapter 7 concluded the Java fundamentals section of this book. The topics in that section are common across many programming languages, including non-object-oriented programming (OOP) languages...