Short answer
Three phases: Loading (a classloader reads the bytecode and creates the Class object), Linking, and Initialization.
Explanation
Linking splits into Verification (bytecode is type-safe and well-formed), Preparation (static fields allocated and set to default zero values), and Resolution (symbolic references resolved to direct references, may be lazy). Initialization runs static initializers and static-field assignments in <clinit>, triggered on first active use and guaranteed to run exactly once per class in a thread-safe way.
Common mistakes
- Mixing up loading, linking and initialization.
- Forgetting the verification step.