title: Does the "switch" statement in Java only work with integers?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/338206/switch-statement-with-strings-in-java">Switch Statement With Strings in Java?</a>  </p>
  </blockquote>
  
  
  
  <p>Does the "switch" statement in Java only work with integers ?</p>
  
  <p>Can't I write something like this instead ?</p>
  
  <p>switch(string)
    case "hello": ...</p>
  
  <p>thanks</p>