• 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