title: Final field initialization in a subclass
body: <p>Strange, but I can't find a duplicate for this question.
  I have a superclass with overrideMe() method and a subclass that overrides it.
  Is the final field really initialized before the subclass constructor is called?
  As I can see from the output, it is. </p>
  
  <p>Here's the output:
  Superclass constr
  str value: someValue
  Subclass constr
  str value: someValue</p>
  
  <p>Could you please explain this to me?
  I thought that instance variables are initialized within the constructor call but not before it.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>public class Test {
    public Test() {
      System.out.println("Superclass constr");
      overrideMe();
    }
  
    public void overrideMe() {
    }
  }
  
  class Ext extends Test {
    private final String str = "someValue";
  
    public Ext() {
      System.out.println("Subclass constr");
    }
  
    @Override
    public void overrideMe() {
      System.out.println("str value: " + str);
    }
  
    public static void main(String[] args) {
      Ext test = new Ext();
      test.overrideMe();
    }
  }
  </code></pre>
  
  <p><strong>EDIT:</strong>
  if I declasre str field as non-final, the subclass call of it in the constructor returns null as I expect.</p>