title: How can a Java enum start with 1?
body: <p>Taking a look at the source code of <code>java.time.DayOfWeek</code> reveals:</p>
  
  <pre><code>public enum DayOfWeek implements TemporalAccessor, TemporalAdjuster {
  
      /**
       * The singleton instance for the day-of-week of Monday.
       * This has the numeric value of {@code 1}.
       */
      MONDAY,
      /**
       * The singleton instance for the day-of-week of Tuesday.
       * This has the numeric value of {@code 2}.
       */
      TUESDAY,
  
      // ..
  }
  </code></pre>
  
  <p>So how can <code>DayOfWeek.MONDAY = 1</code>? I am asking because I use GWT which does not support the new <code>java.time</code> stuff yet (or never will be idk). So what I did I made my own version of <code>DayOfWeek</code> but that one got a <code>public int getValue() { return ordinal() + 1; }</code> which is really annoying since I have to call it everytime.</p>
  
  <p>That is why I am curious why the above version starts with 1. The other thing I'd like to know is why the f this <strong>has</strong> to start with 1 and not with 0 just like every other enum does. They could have gone for <code>Monday = 0</code>, <code>Tuesday = 1</code>, etc. but <strong>no</strong>! They instead switched from <code>Sunday = 0</code>, <code>Monday = 1</code>, etc. to that thing up there. </p>
  
  <hr>
  
  <p>No, this is not an option</p>
  
  <pre><code>public enum MyDayOfWeek {
  
      DUMMY,
  
      MONDAY, TUESDAY, // ..
      ;
  }
  </code></pre>
  
  <p>Simply because this would be annoying:</p>
  
  <pre><code>for(MyDayOfWeek day : MyDayOfWeek.value() {
     if(MyDayOfWeek.DUMMY == day) {
        continue;
     }
  }
  </code></pre>
  
  <p><strong>[SUMMARY]</strong>   </p>
  
  <p>If user-defined enums always start with the first element having the value '0' then how does the first element of the <code>java.time.DayOfWeek</code> enum start with '1', and is there a way to have my enum start with '1' instead of '0'?</p>