This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Static local inner class

 
Shailendra Bade
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I have a static inner class inside a method(local static
inner class).

------------------
Shailendra Bade
Mumbai, India
Mail to: bades@vsnl.com
 
Junaid Bhatra
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Within a method, the only modifier you can use is final. You cannot use private, protected, public, static, etc inside a method. Hence you cannot declare a local static inner class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic