Given that the inner class has a field with a reference to an instance of the enclosing class, I donβt see how it can be loaded without loading the closing class.
A static nested class may be different, since it really does not depend on its enclosing class.
source share