Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Wiki Markup
            According to [12§12.4, "Initialization of Classes and Interfaces" |http://java.sun.com/docs/books/jls/third_edition/html/execution.html#12.4] of the _Java Language Specification_ \[[JLS 2005|AA. Bibliography#JLS 05]\]

...

Wiki Markup
In other words, the presence of a {{static}} field triggers the initialization of a class. However, a static field could depend on the initialization of a class, possibly creating an initialization cycle. The _Java Language Specification_ also states in [8§8.3.2.1, "Initializers for Class Variables" |http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.3.2.1] \[[JLS 2005|AA. Bibliography#JLS 05]\]

...

Wiki Markup
\[[JLS 2005|AA. Bibliography#JLS 05]\] 
[8§8.3.2.1, Initializers for Class Variables|http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.3.2.1] 
[12§12.4, Initialization of Classes and Interfaces|http://java.sun.com/docs/books/jls/third_edition/html/execution.html#12.4]
  Puzzle 49: Larger Than Life

...