The class loader subsystem's responsibilities are not limited to just locating and importing the binary data for classes. It also verifies that the imported classes are correct, allocates and initializes memory for class variables, and assists in resolving symbolic references. These activities are performed in a strict order:
- Loading: The class loader reads the .class file and finds and imports binary data for a type.
- Linking: It performs verification, preparation, and (optionally) resolution:
- Verification: Ensures the correctness of the imported type
- Preparation: Allocates memory to class variables and initializes the memory to default values
- Resolution: Transforms symbolic references from the type into direct references ...