I'm studying the
SCJP 1.5 book by Kathy Sierra and Bert Bates, and have the following question (related to pages 645 and 646):
Why can 'final' local variables be referenced in a method-local inner class? That is, what impact does the 'final' modifier have on the variable's lifecycle/scope or garbage collection?
Example (from book) where variable z must be 'final':