title: Constructor call must be the first statement in a constructor
body: <p>I do not understand why the below code displays the error <code>Constructor call must be the first statement in a constructor</code> if I shift <code>this(1);</code> to the last line in the constructor.</p>
  
  <pre><code>package learn.basic.corejava;
  
  public class A {
      int x,y;
  
      A()
      {     
          // this(1);// -&gt;&gt; works fine if written here
          System.out.println("1");
          this(1);  //Error: Constructor call must be the first statement in a constructor
      }
  
      A(int a)
      {
          System.out.println("2");
      }
  
      public static void main(String[] args) { 
          A obj1=new A(2);  
      }   
  }
  </code></pre>
  
  <p>I've checked many answers on this topic on StackOverflow but I still could not understand the reason for this. Please help me to make clear about this error with some easy example and explanation. </p>