I was playing around some static inner class.
package com.tutorial;
public class MyUpperClass {
private MyUpperClass () {
}
private static class MyStaticInnerClass{
private static final MyUpperClass muc = new MyUpperClass ();
}
public static MyUpperClass getInstance() {
return MyStaticInnerClass.muc;
}
}
Now, My question is, when does MystaticInnerClass get loaded into the JVM memory?
At the time of, when MyUpperClass get loaded or getInstance() get called?