title: Initialize variable inside class without constructor
body: <p>Here is some simple java code .</p>
  
  <pre><code>class Test {
      public static void main(final String[] args) {
          TestClass c = new TestClass();
          System.out.println(c.x);
      }
  }
  
  class TestClass {
      {
          x = 2;
      }
      int x = 1;
  }
  </code></pre>
  
  <p>I am getting the answer 1. Why?
  Is there no constructor used to initialize?</p>