title: method parameter, instance variable
body: <p>In the following code I have <code>this.name= name</code>, when I print out I get a name of the student.
  However when I change my code for <code>name= this.name</code>, I receive null in the print out, why is that?
  Or when I further change <code>name = name</code>.</p>
  
  <pre><code>public Student(String name, String groupName, int javaProf, String cprNumber, Gender gender) {
          this.name=name; 
  
          //"name" refers to method parameter and "this.name" refers to the instance variable. Instance field
          //takes precedence over method parameter and avoids name clash
  
          this.groupName = groupName;
          this.javaProf = javaProf;
          this.cprNumber = cprNumber;
          this.gender = gender;
          this.courses = new HashMap&lt;&gt;();
      }
  }
  </code></pre>