title: enum name isnt allowed by compiler
body: <p>So I had troubles with declaring enums in my program so I copied the code from the sun website example, at first the compiler was older then 1.5 so I updated it and the error changed to this:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: examples.Day.values()[Lexamples/Day;
  at examples.EnumTest.$SWITCH_TABLE$examples$Day(EnumTest.java:7)
  at examples.EnumTest.tellItLikeItIs(EnumTest.java:15)
  at examples.EnumTest.main(EnumTest.java:37)
  </code></pre>
  
  <p>my code:</p>
  
  <pre><code>import java.lang.Enum;
  public enum Day {
  SUNDAY, MONDAY, TUESDAY, WEDNESDAY,
  THURSDAY, FRIDAY, SATURDAY ;
  }
  public class EnumTest {
  Day day;
  
  public EnumTest(Day day) {
      this.day = day;
  }
  
  public void tellItLikeItIs() {
      switch (day) {
          case MONDAY:
              System.out.println("Mondays are bad.");
              break;
  
          case FRIDAY:
              System.out.println("Fridays are better.");
              break;
  
          case SATURDAY:
          case SUNDAY:
              System.out.println("Weekends are best.");
              break;
  
          default:
              System.out.println("Midweek days are so-so.");
              break;
      }
  }
  
  public static void main(String[] args) {
      EnumTest firstDay = new EnumTest(Day.MONDAY);
      firstDay.tellItLikeItIs();
      EnumTest thirdDay = new EnumTest(Day.WEDNESDAY);
      thirdDay.tellItLikeItIs();
      EnumTest fifthDay = new EnumTest(Day.FRIDAY);
      fifthDay.tellItLikeItIs();
      EnumTest sixthDay = new EnumTest(Day.SATURDAY);
      sixthDay.tellItLikeItIs();
      EnumTest seventhDay = new EnumTest(Day.SUNDAY);
      seventhDay.tellItLikeItIs();
  }
  }
  </code></pre>