An inner class does
not necessarily have an instance of an enclosing class. And no, I'm not talking about an "inner class" that is really a static nested class. I'm talking about actual inner classes, as defined in the
Java Language Specification, that are declared ina static context, as that term is defined in the Java Language Specification. An inner class defined in a static context is still considered an inner class, even though there is no enclosing instance.
Among other things, this means that an inner class in a static context cannot declare a static member - even if there seems no good reason not to allow it. It certainly would have been possible to allow static members. And in fact, it's possible to inherit static members from non-inner classes that you extend. But they don't want you declaring new ones, I think they did this for simplicity. If an inner class
does have an enclosing instance (as it usually does), would a static member of that inner class have a one t- one association with the
instance of the outer class, or with the outer class itself? That's a mildly confusing issue which they might need to explain to people with a special rule. Instead they chose to simply ban static members of inner classes. And there's really no
need for a static member in an inner class. Any data you want in a static field of an inner class, you can just put it in a static field of the enclosing class.