title: Simple switch in "for" loop and toLowerCase() method
body: <p>I am very much a beginner in Java. I am making a simple switch, in which the user is entering a number in words. For training I added a "for" loop.</p>
  
  <pre><code>package JavaExc;
  import java.util.Scanner;
  
  
  public class JavaStart {
  
      public static void main(String[] args) {
          Scanner sck = new Scanner(System.in);
          System.out.println("Type loop counter ");
  
          int counter = sck.nextInt();
  
          System.out.println("Counter is: " + counter );
  
  
          for (int i = 0; i &lt;= counter; i++) {
  
  
              System.out.println("Type number in words");
              String ch = sck.nextLine();
  
              switch (ch.toLowerCase()) {
  
  
                  case "one":
                      System.out.println("CHOICE 1");
                      break;
                  case "Two":
                      System.out.println("CHOICE 2");
                      break;
                  case "THREE":
                      System.out.println("CHOICE 3");
                      break;
                  case "FoUr":
                      System.out.println("CHOICE 4");
                      break;
                  case "fiVE":
                      System.out.println("CHOICE 5");
                      break;
  
                  default:
                      System.out.println("Wrong Data");
                      break;
  
              }
  
              System.out.println("Loops left:\n " + counter--);
          }
          System.out.println("End of Switch");
  
  
      }
  }
  </code></pre>
  
  <p>Here is the result:</p>
  
  <pre><code>Type loop counter 
  5
  Counter is: 5
  Type number in words
  Wrong Data                   // ??
  Loops left:
  5
  Type number in words
  one
  CHOICE 1
  Loops left:
  4
  Type number in words
  three                        // Should be ok, so what is wrong here?
  Wrong Data
  Loops left:
  3
  End of Switch                //To early break loop I think
  
  Process finished with exit code 0
  </code></pre>
  
  <p>My questions are: Why first loop make default code? Should I make 2 Scanners? One for take value for counter and second for switch? 
  Why counter and numbers in words do not working properly? </p>
  
  <p>I know I can do it with tables etc. but generally, the purpose of this program is to test the "toLowerCase()" method.</p>