I'm interested in the sequence of variable(static or instance) declarations and their block initializers (static or instance respectively).
Is the declaration executed earlier then the block even it is declared later? Such as following code,
According to JLS8.3.2.3,
http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#287406 it seems the above code will compile without error, but when I compile it under 1.4, it says "illegal forward reference". In JLS it also has a long code as follow,
I compile the above code with error lines commented, it fails too. So now I'm confused, or have I misunderstood the JLS?