wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Static local inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Static local inner class" Watch "Static local inner class" New topic

Static local inner class

Shailendra Bade

Joined: Jul 04, 2000
Posts: 22
Can I have a static inner class inside a method(local static
inner class).

Shailendra Bade
Mumbai, India
Mail to: bades@vsnl.com

Shailendra Bade<BR>Mumbai, India<BR>Mail to: bades@vsnl.com
Junaid Bhatra
Ranch Hand

Joined: Jun 27, 2000
Posts: 213
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: Static local inner class
Similar Threads
static class
[static variable]....
Outer class instance
Inner classes
Abt Inner Classes....