title: Switch statement not being entered
body: <p>I'm experiencing a strange problem. I have a case statement, and it is not being entered, at all. I've stepped it through with the Eclipse debugger and it gets the line above and then goes straight to the line after. It compiles and runs with no errors.</p>
  
  <p>This is a general outline:</p>
  
  <pre><code>    for (int k = 0; k&lt;9; k++) {
          System.out.println("Program is here - #1");
          doSomething();
          switch (switchcode) {
  
          case 1:
              switch (k) {
  
              case 1: case 2: case 3:
                  doOneOneTwoThree(); //#2
                  break;
              case 4: case 5: case 6:
                  doOneFourFiveSix(); //#3
                  break;
              default:
                  System.err.println("error k defaulted in case 1");
                  break;
              }
              break;
          case 2:
              switch (k) {
  
              case 1: case 2: case 3:
                  doTwoOneTwoThree(); //#4
                  break;
              case 4: case 5: case 6:
                  doTwoFourFiveSix(); //#5
                  break;
              default:
                  System.err.println("error k defaulted in case 2");
                  break;
              }
              break;
          default:
              System.err.println("error switchcode defaulted");
              break;
          }
  
          doSomethingElse();
      }
  </code></pre>
  
  <p>I'm doing something wrong, no doubt, but I really don't know what exactly.
  Is it because I am switching on k within a case? I have done this before and it has worked, perhaps luckily.</p>
  
  <p>Is the nesting of case statements within a larger for-loop causing problems? </p>
  
  <p>I saw "Branch Prediction Fail" occasionally whilst I was researching around, I don't know exactly what that is but it might be happening.</p>
  
  <p>Is having <code>break;</code> in the default cases causing problems? I don't think it is because I tried it without them and had the same results.</p>
  
  <p>Sorry for the long code and question. Thanks for ANY guidance. </p>