I was bit confused when is the inner class (non static) gets loaded by the jvm . Is it dependent on the outer class. or can it be separately loaded without loading the outer class ?
Given that an inner class has a field with reference to an instance of the enclosing class, I don't see how it could be loaded without loading the enclosing class.
A static nested class may well be different, as that's genuinely independent of its enclosing class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With