wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "local inner class parameters" Watch "local inner class parameters" New topic
Author

local inner class parameters

Ken Sampson
Ranch Hand

Joined: Sep 26, 2007
Posts: 45
Hello,

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
Sheriff

Joined: Oct 13, 2005
Posts: 38033
    
  22
More of a beginner's question.
Have a look at this recent thread; a search will pick up lots more examples in the Ranch.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: local inner class parameters
 
Similar Threads
Method Local inner class
Inner Classes
regd local inner class (method level)
Inner class
method-local inner class object cannot use the local variables