O'Reilly logo

The Java® Language Specification, Java SE 7 Edition, Fourth Edition by Alex Buckley, Gilad Bracha, Guy Steele, Bill Joy, James Gosling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

16.8. Definite Assignment and Static Initializers

Let C be a class declared within the scope of V. Then:

V is definitely assigned before an enum constant (§8.9.1) or static variable initializer (§8.3.2.1) of C iff V is definitely assigned before the declaration of C.

Note that there are no rules that would allow us to conclude that V is definitely unassigned before a static variable initializer or enum constant. We can informally conclude that V is not definitely unassigned before any static variable initializer of C, but there is no need for such a rule to be stated explicitly.

Let C be a class, and let V be a blank static final member field of C, declared in C. Then:

V is definitely unassigned (and moreover is not definitely assigned) before ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required