title: Why do we use 'this' in setter method but not in getter method?
body: <p>For example, in the following code:</p>
  
  <pre><code>private int id;
  
  public void setID(int ID) {
      this.id = ID;
  }
  
  public void getID() {
      return id;
  }
  </code></pre>
  
  <p>Why don't we say <code>return this.id</code> in the getter function or conversely say <code>id = ID</code> in the setter function? Also is <code>this</code> actually necessary? I mean, aren't the functions called through an object, say <code>obj.setid(1)</code> or <code>obj.getid()</code>? Will it work differently if I don't use the <code>this</code> keyword?</p>