title: Exception handling error: cannot find symbol variable
body: <pre><code>public static void operation() {
      try {
          Scanner input = new Scanner(System.in);
          String choiceString = "";
          char choice = 'a';
          System.out.print("Enter letter of choice: ");
          choiceString = input.next();
          if (choiceString.length() == 1) {
              choice = choiceString.charAt(0);
              System.out.println("-------------------------------------------");
  
          switch(choice) {
              case 'a': {
                  ....
                  break;  
              }
              case 'b': {
                  ....    
              }
              default:
                  throw new StringException("Invalid choice...");
          }
          }else {
              throw new StringException("Invalid input...");
          }
      } catch(StringException i) {
          System.out.println("You typed " + choiceString + i);
      }
  </code></pre>
  
  <p>When the program prompts the user to enter the letter of choice, and the user enters a word or a number, it should catch the exception. It should display this output:</p>
  
  <pre><code>You typed: ashdjdj
  StringException: Invalid input...
  </code></pre>
  
  <p>Problem here is, it could not find the variable choiceString. How do I fix this?</p>