title: How is it possible to access static variables from a null reference?
body: <p>Recently I was going through <a href="http://javarevisited.blogspot.in/2011/11/static-keyword-method-variable-java.html" rel="nofollow">a page on javarevisited</a> and found a block of code which asked the readers to determine what would be the output for it... </p>
  
  <p>Though I got the output I am not satisfied with the result (WHICH CAME OUT TO BE "Hello") since I don't know how a static member is accessed from a null reference. What's happening in the background?</p>
  
  <pre><code>public class StaticDEMO {
  
      private static String GREET = "Hello";
  
      public static void main(String[] args) {
          StaticDEMO demo = null;
          System.out.println(demo.GREET);
          // TODO code application logic here
      }
  }
  </code></pre>