Java / JVM Architecture (Java21) Interview questions
What is the Class Loader subsystem in JVM?
The Class Loader subsystem is the part of the JVM responsible for locating a class's bytecode and bringing it into the runtime, in three ordered phases: loading, linking, and initialization.
Loading reads the .class file bytes (from the classpath, a JAR, or a network location) and creates a corresponding java.lang.Class object in the Method Area.
Linking then verifies the bytecode, allocates memory for static fields, and resolves symbolic references, before initialization runs static initializers and assigns real static field values.
This all happens lazily - a class is not loaded until it is first actively used, such as being instantiated or having a static method called.
More Related questions...