title: Why is it better to use class name instead of objects to access class methods or variables in Java?
body: <p>I was reading Code Conventions for Java from <a href="http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-137265.html#587" rel="nofollow">http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-137265.html#587</a>.</p>
  
  <p>In that, they have mentioned that we should avoid the use of objects to access a class variable or a method and should we use the class name instead.</p>
  
  <blockquote>
    <p>Avoid using an object to access a class (static) variable or method.
    Use a class name instead. For example:</p>
  
  <pre><code>classMethod();             //OK 
  AClass.classMethod();      //OK
  anObject.classMethod();    //AVOID!
  </code></pre>
  </blockquote>
  
  <p>Is there a particular reason for this in terms or performance or something else?</p>