Why can my instance initializer block reference a field before it is declared?

From docs: The Java compiler copies initializer blocks into every constructor. Therefore, this approach can be used to share a block of code between multiple constructors. The above statement is slightly misleading, because if we follow the explanation of the above doc we can rewrite the original code like this: public class WrongVersionOfWhyIsThisOk { int … Read more