This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes local inner class parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "local inner class parameters" Watch "local inner class parameters" New topic

local inner class parameters

Ken Sampson
Ranch Hand

Joined: Sep 26, 2007
Posts: 45

I am not able to understand why a local variable is required to be declared final for a local inner class. Please let me know with an illustration.

Ken Sampson
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 44545
More of a beginner's question.
Have a look at this recent thread; a search will pick up lots more examples in the Ranch.
I agree. Here's the link:
subject: local inner class parameters
jQuery in Action, 3rd edition