title: Getting all names in an enum as a String[]
body: <p>What's the easiest and/or shortest way possible to get the names of enum elements as an array of <code>String</code>s?</p>
  
  <p>What I mean by this is that if, for example, I had the following enum:</p>
  
  <pre><code>public enum State {
      NEW,
      RUNNABLE,
      BLOCKED,
      WAITING,
      TIMED_WAITING,
      TERMINATED;
  
      public static String[] names() {
          // ...
      }
  }
  </code></pre>
  
  <p>the <code>names()</code> method would return the array <code>{ "NEW", "RUNNABLE", "BLOCKED", "WAITING", "TIMED_WAITING", "TERMINATED" }</code>.</p>