title: Java enum - why use toString instead of name
body: <p>If you look in the enum api at the method <a href="https://docs.oracle.com/javase/10/docs/api/java/lang/Enum.html#name()" rel="noreferrer" title="Javadoc for Enum"><code>name()</code></a> it says that:</p>
  
  <blockquote>
    <p>Returns the name of this enum constant, exactly as declared in its enum declaration. 
            Most programmers should use the toString method in preference to this one, 
            as the toString method may return a more user-friendly name.
            This method is designed primarily for use in specialized situations where correctness depends on getting the exact name, which will not vary from release to release.</p>
  </blockquote>
  
  <p>Why is better to use <code>toString()</code>? I mean toString may be overridden when name() is already final. So if you use toString and someone overrides it to return a hard-coded value your whole application is down... Also if you look in the sources the toString() method returns exactly and just the name. It's the same thing.</p>