Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

local inner class parameters

 
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
Sheriff
Posts: 48921
58
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic