title: Why can't I create an enum in an inner class in Java?
body: <p>What I try to do is this:</p>
  
  <pre><code>public class History {
      public class State {
          public enum StateType {
  </code></pre>
  
  <p>Eclipse gives me this compile error on <code>StateType</code>: <code>The member enum StateType must be defined inside a static member type</code>.</p>
  
  <p>The error disappears when I make the <code>State</code> class static. I could make <code>State</code> static, but I don't understand why I cannot declare an <code>enum</code> in an inner class.</p>