title: Java switch case - default vs explicit enumeration
body: <p>I'm using Java 6.</p>
  
  <p>Suppose I have an enum with 6 values, ordered A to F. About 4 of the values were handled the same. I could write it like this.</p>
  
  <pre><code>switch (whichType) {
      case A:
      case B:
      case C:
      case D:
          return task();
      case E:
          return someothertask();
      case F:
          return anothersomeothertask();
  }
  </code></pre>
  
  <p>Or like this.</p>
  
  <pre><code>switch (whichType) {
      case E:
          return someothertask();
      case F:
          return anothersomeothertask();
      default:
          return task();
  }
  </code></pre>
  
  <p>Null values will never reach this switch.</p>
  
  <p>In terms of conciseness and clarity, the second approach is better. In terms of being explicit, I think the first approach is better.</p>
  
  <p>Are there any other pros/cons of each approach?</p>
  
  <p>Also, this simple question risks being a duplicate, but I tried and couldn't find it asked anywhere yet. I apologize if I haven't searched it good enough.</p>