posted 21 years ago
Howdy -- it helps me if I think of inner classes as "members" of the enclosing class. Even though they're classes, they are still a part of the enclosing class. And remember, when something in a class, such as a method, is marked private, that means private to the *class*, not private to the *instance*. There is no access restriction that means *private to the instance*. Any instance can access the private members of a *different* instance of the same type.
So inner classes are just a broader application of that *private to the class but not to the instance* behavior. And if you think of inner classes as being a helper part of the enclosing class, then it makes more sense that different inner class members of the same enclosing class would want that same special access to one another's private stuff.
cheers,
Kathy