Hello, Janne and Scott. I see in different places of your book method parameters are considered to be local variables and contradictory when talking about new var feature and explaining why code does not compile exactly opposite stated.
In Chapter 2.
Java Building Blocks. Examples with var it is stated that method parameters are not local variables.
In this example, a and b are method parameters. These are not local variables.
Later on in Chapter 2. Java Building Blocks. Managing Variable Scope
There are two local variables in this method. The bitesOfCheese variable is declared inside the method. The piecesOfCheese variable is a method parameter and, as discussed earlier, it is also a local variable.
Excerpt From: Boyarsky, Jeanne. “OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide
My understanding that method parameters can be considered local variables.