title: jdk 8 does not allow string in switch statement ?? why
body: <pre><code>error:
  Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum constants are permitted code.  
  </code></pre>
  
  <p>Here is an example:</p>
  
  <pre><code>String typeOfDay;
           switch (dayOfWeekArg) {
               case "Monday":
                   typeOfDay = "Start of work week";
                   break;
               case "Tuesday":
               case "Wednesday":
               case "Thursday":
                   typeOfDay = "Midweek";
                   break;
               case "Friday":
                   typeOfDay = "End of work week";
                   break;
               case "Saturday":
               case "Sunday":
                   typeOfDay = "Weekend";
                   break;
               default:
                   throw new IllegalArgumentException("Invalid day of the week: " + dayOfWeekArg);
           }
  </code></pre>