title: Case expressions must be constant expressions for static final int?
body: <p>I have a <code>final class Ring</code> defined as:</p>
  
  <pre><code>final class Ring {
      public static final int OUT = 3;
      public static final int MID = 2;
      public static final int IN  = 1;
  }
  </code></pre>
  
  <p>I also have a <code>public class MorrisBoard</code> with the following code:</p>
  
  <pre><code>public class MorrisBoard {
      public static final Ring RING = new Ring();
  
      private boolean checkMillBy(int ring, int x, int y) {
      switch(ring) {
      case MorrisBoard.RING.OUT:
          //...
      case MorrisBoard.RING.MID: //etc.
          //...   
      }
      return false;
  }
  </code></pre>
  
  <p><code>MorrisBoard.RING.OUT</code> references a variable which is immutable for the lifetime of the program. All values are final. </p>
  
  <p>However, I still get the following error: <code>case expressions must be constant expressions</code>. I'm confused by this - <code>MorrisBoard.RING.OUT</code> is a constant expression. </p>
  
  <p>What is going on here?</p>