Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Inner static puzzle
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Lasse Reichstein Nielsen, post: 3010683"] My guess is that it's for consistency with the idea that an inner class (a non-static nested class) is not /one/ class, but one class /per instance/ of the outer class. Following that idea, everything you describe become necessary. You cannot have a static field shared by all the inner classes, since a static belongs to only one class[1]. /L [1] ... although you could implement it by implementing statics on the inner class as non-statics on instances of the outer class. THAT would be hackery, though. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Inner static puzzle
Top