title: What is the real meaning of 'this' in Java?
body: <p>I looked at a <a href="https://stackoverflow.com/questions/15593420/why-cant-i-use-the-keyword-this-when-referring-to-fields-in-static-methods">Why can&#39;t I use the keyword &quot;this&quot; when referring to fields in static methods?</a> </p>
  
  <p>and thought that accessing static members through a reference variable is ok, but using <code>this</code> to access such members is not okay. Look at the code below.</p>
  
  <pre><code>static int month; 
  
  public static void setMonth(int x)
  { 
  Date date = new Date();
  date.month = x;  //fine, why ?
      this.month = x;  //compiler error, why ?
  }
  </code></pre>
  
  <p>It clearly shows that <code>this</code> is not the same as a reference variable. If that is so, then what is it really? I need to understand the true meaning of <code>this</code> to understand why it cannot be accessed from a static context. </p>
  
  <p><strong>Please don't give me links to random blogs or oracle tutorials which say that <code>this</code> can't be used from a static context - I already know that.</strong> I want to look beyond that and understand why it can't be used.</p>
  
  <p>Code in linked question - </p>
  
  <pre><code>public class Date
  {
  
  static int month; 
  
  public static void setMonth(int x)
  { 
   this.month = x;  //compiler error
  }
  
  public static int getMonth()
  {
   return month;  //compiles just fine, no error
  }
  
  }
  </code></pre>