title: Why does Java require EnumClass.VALUE instead of just VALUE?
body: <p>If you have a Java <code>enum</code> and a variable of the enum's type, as so:</p>
  
  <pre><code>public enum Something
  {
     VAL1,
     VAL2,
     VAL3
  }
  
  public Something varName;
  </code></pre>
  
  <p>why is it necessary to write <code>varName = Something.VAL1;</code> instead of simply <code>varName = VAL1;</code>? Shouldn't the compiler know from the type of <code>varName</code> that it can only take <code>null</code>, <code>VAL1</code>, <code>VAL2</code>, and <code>VAL3</code> as values?</p>