my dog learned polymorphism
The moose likes Java in General and the fly likes Inner classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Inner classes" Watch "Inner classes" New topic

Inner classes

Lalit Kapoor

Joined: Jun 06, 2004
Posts: 20
A non-inner class cannot cantain static variables. Why?
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
you'd better rephrase that, because a non-inner class (i.e. any class that's not an inner class) can have static members to its heart's content.

I agree. Here's the link:
subject: Inner classes
It's not a secret anymore!