title: Why the enum constants must be declared before any other variables and methods declaration in an enum type?
body: <p>If I declare a variable before or without declaring enum constants in this way:</p>
  
  <pre><code>enum MyEnum
  {
      int i = 90;
  }
  </code></pre>
  
  <p>It shows following compilation error.</p>
  
  <pre><code>MyEnum.java:3: &lt;identifier&gt; expected
  {
   ^
  MyEnum.java:4: ',', '}', or ';' expected
          int i = 90;
          ^
  MyEnum.java:4: '}' expected
          int i = 90;
               ^
  MyEnum.java:5: class, interface, or enum expected
  }
  ^
  4 errors
  </code></pre>
  
  <p>But if I declare an enum constant before declaring <code>i</code> then it compiles fine. <br>
  Even the following code will compile fine:</p>
  
  <pre><code>enum MyEnum
  {
      ;//put a semicolon
      int i = 90;
  }
  </code></pre>
  
  <p>Why java enum is designed in this way?</p>