Copies are made

When an object of the local class is instantiated, copies of the final local variables and method parameters referred to by the object's methods are stored as instance variables in the object.

The methods in the object of the local class really access those hidden instance variables.

Local variables and method parameters accessed by the methods of the local class must be declared final to prevent their values from changing after the object is instantiated.

File: bc.htm [Next] [Prev]