title: Why this program does not give ambiguity error
body: <p>I have a java program where a paramaterized constructor is used with the parameters names same as that of instance variables.
  In such case we need to use this keyword. But when I do not use this keyword it does not gives any error instead it initializes instance variables with default values.</p>
  
  <pre><code>class Demo{
      int a;
      Demo(int a)
      {
         a = a;
      }
  
      public static void main(String args[])
      {
          Demo d = new Demo(5);
      }
  }
  </code></pre>
  
  <p>But when this program is executed the value of a becomes 0. How?</p>