Tagged articles

instance initializer

1 articles · Page 1 of 1
samdeepthink
samdeepthink
Sep 1, 2026 · Fundamentals

Why Java Static Blocks Aren’t Executed First

The article explains that Java static blocks are not always the first code to run during class loading because static field initializers and static blocks are executed in the order they appear in the source, and a static field can trigger instance initialization.

Class LoadingJavaJava fundamentals
0 likes · 6 min read
Why Java Static Blocks Aren’t Executed First