title: Unable to switch on String in JRE7
body: <p>I'm on jre7 and I still can't switch on Strings. I installed jdk7 update 1 and pointed Eclipse to it but still no luck. Any idea what I'm doing wrong?</p>
  
  <p>Here is a the code:</p>
  
  <pre><code>String code = "something";
  switch(code) {
      case "xxx": dosomehting(); break;
      default: dosomethingelse(); break;
  }
  </code></pre>
  
  <p>The error I get:</p>
  
  <blockquote>
    <p>Cannot switch on a value of type String. Only convertible int values or enum constants are permitted.</p>
  </blockquote>