Pregunta de entrevista de Morgan Stanley

When does a java static class get loaded/intialized by jvm?

Respuestas de entrevistas

Anónimo

9 de ene de 2017

A Java static class is loaded by jvm when anyone of the following occurs : 1. A non constant static field is used 2. A static field is assigned 3. A static method of the class is invoked 4. An instance of the class is created In nutshell, we can say when enclosing Java class is used for the first time.

2

Anónimo

8 de may de 2011

When the class is first referenced

1