title: Using switch statement with a range of value in each case?
body: <p>In Java, is it possible to write a switch statement where each case contains more than one value? For example (though clearly the following code won't work):</p>
  
  <pre><code>switch (num) {
      case 1 .. 5:
          System.out.println("testing case 1 to 5");
          break;
      case 6 .. 10:
          System.out.println("testing case 6 to 10");
          break;
  }
  </code></pre>
  
  <p>I think this can be done in Objective C, are there a similar thing in Java? Or should I just use <code>if</code>, <code>else if</code> statements instead?</p>