• Post Reply Bookmark Topic Watch Topic
  • New Topic

local inner class parameters  RSS feed

 
Ken Sampson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Marshal
Posts: 55782
164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!