posted 22 years ago
You can't instantiate an inner class prior to instantiating the enclosing class. All inner classes must have an enclosing instance in order to exist. The inverse is not true. You do not need to instantiate an inner class to instantiate an outer class. By that, I mean that, if an outer class has a reference to an inner class, that reference can remain null after the outer class is instantiated.
You can, however, create an instance of a top-level nested class (which is like an inner class, but it is static, so it's not truly an inner class) without an instance of the enclosing class.
I hope that helps,
Corey