wood burning stoves 2.0
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes static members in inner classes 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 members in inner classes" Watch "static members in inner classes" New topic

static members in inner classes

Srinivasan Mani
Ranch Hand

Joined: Apr 03, 2002
Posts: 36
Why static members are not allowed inside inner class?
Peter Wu

Joined: Nov 24, 2002
Posts: 9
An inner class is a nested class that is not explicitly or implicitly declared static. Inner classes may not declare static initializers or member interfaces. Inner classes may not declare static members, unless they are compile-time constant fields.
dragon ji
Ranch Hand

Joined: Oct 31, 2002
Posts: 110
because the inner class is member variable same as member and class variables.Can you declare static variables in method?

scjp 1.4<br />challenge haven't limit!
I agree. Here's the link: http://aspose.com/file-tools
subject: static members in inner classes
It's not a secret anymore!