Tag

Static Block

0 views collected around this technical thread.

Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 24, 2020 · Fundamentals

Understanding Java Static Variable and Static Block Initialization Order

This article explains how Java initializes static variables and static blocks, demonstrates the order with ThreadLocal hash‑code generation examples, analyzes class loading rules, and summarizes the impact on object instantiation and inheritance hierarchies.

Class LoadingJVMJava
0 likes · 8 min read
Understanding Java Static Variable and Static Block Initialization Order
Java Captain
Java Captain
Nov 4, 2017 · Fundamentals

Understanding Java Class Loading, Verification, Preparation, and Initialization

This article explains the Java Virtual Machine's class loading lifecycle—including loading, verification, preparation, resolution, and initialization—illustrated with multiple code examples that show when static blocks and fields are executed and why certain classes may not be initialized.

Class LoadingInitializationJVM
0 likes · 13 min read
Understanding Java Class Loading, Verification, Preparation, and Initialization