posted 16 years ago
A non-static one is "connected" to an instance of the outer class; for example, this code works because each Inner instance is connected to an "Outer" instance:
But if you make Inner static, then this doesn't compile. Inner could still access "i" in an Outer object, but there's not an implicit Outer object as there is in this example. In other words, you can create an instance of a static inner class without ever creating an instane of the outer class, but a non-static one requires such an instance.