title: Java how to use global variables in switch statement
body: <p>I have three integer global variables:</p>
  
  <pre><code>   public static int a = 1;
     public static int b = 2;
     public static int c = 3;
  </code></pre>
  
  <p>I want to do:</p>
  
  <pre><code>int code = dis.readInt();
  switch(code)
  {
      case a: 
      ......
      break;
      case b:
      ......
      break;
      case c:
      ......
      break;
  }
  </code></pre>
  
  <p>But it is not working, can anyone help? Thanks!</p>