title: Why do i get an error message in my switch statement?
body: <p>I am trying to write a program that, well i cant explain it but you can see it yourself but there's a Problem. Every case in the switch statement has an error message.</p>
  <pre><code>public class Main {
      
      static int keyZero;
      static int keyOne;
      static int keyTwo;
      static int keyThree;
      static int keyFour;
      static int keyFive;
      static int keySix;
      static int keySeven;
      static int keyEight;
      static int keyNine;
      
      static int currentFirstNumber = keyZero;
      static int currentMiddleNumber = keyZero;
      static int currentLastNumber = keyZero;
      
      public static void main(String[] args) 
      {
          
          
          keyZero = KeyEvent.VK_0;
          keyOne = KeyEvent.VK_1;
          keyTwo = KeyEvent.VK_2;
          keyThree = KeyEvent.VK_3;
          keyFour = KeyEvent.VK_4;
          keyFive = KeyEvent.VK_5;
          keySix = KeyEvent.VK_6;
          keySeven = KeyEvent.VK_7;
          keyEight = KeyEvent.VK_8;
          keyNine = KeyEvent.VK_9;
          
          int currentFirstNumber = keyZero;
      
      public static void upFirstNumber()
      {
          switch(currentFirstNumber) {
              case keyZero:
                  currentFirstNumber = keyOne;
                  break;
              case keyOne:
                  currentFirstNumber = keyTwo;
                  break;
              case keyTwo:
                  currentFirstNumber = keyTwo;
                  break;
              case keyThree:
                  currentFirstNumber = keyTwo;
                  break;
              case keyFour:
                  currentFirstNumber = keyTwo;
                  break;
              case keyFive:
                  currentFirstNumber = keyTwo;
                  break;
          }
      }
  
  }
  </code></pre>
  <p>Following error message is the message i get, when i hover over it.
  <code> case expression must be constant expressions</code>
  Please help</p>