title: Other usage of the this keyword in Java
body: <p>(For those who read my previous question, this is the same teacher and the same project.)</p>
  
  <p>My teacher 'inspected' my code for a web application project and provided some suggestions. One of the suggestions was to use the <code>this</code> keyword even in this situation:</p>
  
  <pre><code>private String getUsername() {
      return username;
  }
  </code></pre>
  
  <p>So if I follow his advice, that would become:</p>
  
  <pre><code>private String getUsername() {
      return this.username;
  }
  </code></pre>
  
  <p>I asked him why and he told me that there is another usage for the this keyword other than for clearing up ambiguities. A quick googling returned no results for another usage of the this keyword. Even the <a href="http://java.sun.com/docs/books/tutorial/java/javaOO/thiskey.html" rel="nofollow noreferrer">Java tutorial from Sun</a> mentioned no other usages that would fit in this situation.</p>