title: java.lang.NumberFormatException: For input string: "" when using "2" or "5"
body: <p>I read in a menu choice and typing in any number but 2 &amp; 5 work.</p>
  
  <pre><code>String choice = promptUser(choicePrompt);
  try {
        outputInfo(String.format("choice=...%s...",choice));
        int c = Integer.parseInt(choice);
        /* process it */
  }catch (NumberFormatException e) {
  
  outputInfo(String.format("choice=%s",choice));
  outputInfo(e.toString());
  }
  
  public static void outputInfo(String msg)
  {
      System.out.printf("\t%s\n",msg);
  }
  </code></pre>
  
  <p>Good output:</p>
  
  <pre><code>    Enter Option: 1
      choice=...1...
  </code></pre>
  
  <p>Bad Output:</p>
  
  <pre><code>    Enter Option: 2
      choice=...2...
      choice=2
      java.lang.NumberFormatException: For input string: ""
  </code></pre>
  
  <p>Update:</p>
  
  <p>I've hard-coded "2" and it still fails!:</p>
  
  <pre><code>String choice = promptUser(choicePrompt);
  try {
       choice="2";
       outputInfo(String.format("choice=...%s...",choice));
       int c = Integer.parseInt(choice);
       /* process it */
  }catch (NumberFormatException e) {
  
  outputInfo(String.format("choice=%s",choice));
  outputInfo(e.toString());
  }
  </code></pre>
  
  <p>Hard-coding "5" also fails but "1" works!!!</p>
  
  <p>Any ideas gratefully received.</p>
  
  <p>Simon</p>