title: Writing a program using Switch Case Statement (with the use of letters ABCD not int)
body: <p>I have my code written in if/else Statement and it is working but I have a problem in writing it using switch statement as it appears that there are problems in my variables and symbols.</p>
  
  <p>Can you please spot what is wrong and help me correct it?</p>
  
  <p>My source code below.</p>
  
  <pre><code>import java.util.Scanner;
  import java.io.*;
  
  public class CourseCodeSWITCH {
  
      public static void main(String[] a) {
  
          Scanner in = new Scanner (System.in);
          String code;
          System.out.print("Enter Course Code: ");
          code = in.nextLine();
          switch (code) {
              case A: code = "Accounting";
                      break;
              case B: code = "Banking and Finance";
                      break;
              case C: code = "Computer Science";
                      break;
              case D: code = "Dentistry";
                      break;
              case E: code = "Engineering";
                      break;
          default:
                  System.out.println("Invalid Course Code");
                  break;
          }
      }
  }
  </code></pre>