Motivating examples for switch/case in Java
Consider why you might prefer to use a switch in a production environment:


Fall through processing. The blackjack example given by @Peter is a good example of this because it mirrors how we think about the problem: all of the face cards fall into the same case &amp; the code follows suit. Be careful with this though, it's easy to abuse this to get terser code at the expense of readability
Default handlers. Personally, I find this most useful not in a 'single moment of code', but over a series of refinements. For instance, it's common to not have all your logic to handle multiple situations in place when you start coding, but it's also easy to miss a special case that you meant to add later. A default handler is a convenient &amp; concise way to stub out code that you haven't yet gotten to.  Default handlers for that throw an exceptions or log the event can help avoid silent failures &amp; are less likely to get 'coded out' by an mistakenly adding or removing an if or else.
Maintainability. I find it safer to add &amp; remove code from a switch statement than an if / else if / else block as I'm more likely to accidentally omit an else from an else if than I am to omit a break from a switch.
As per Joshua Bloch's Effective Java: "Switches on enums are good for augmenting external enums types with constant-specific behavior." For example if you cannot change the source for an Operation enum, but need add support for an inverse method:

public static Operation inverse(Operation op){
   switch(op){
      case PLUS:   return Operation.MINUS;
      case MINUS:  return Operation.PLUS;
      case TIMES:  return Operation.DIVIDE;
      case DIVIDE: return Operation.TIMES;
   }
}

Readability. I find a moderately sized switch statement easier to grok than an equivalent if / else if / else block.


When possible, avoid contrived examples for motivating usage. Instead, show where you (or someone else) used a switch &amp; discuss why it was preferable.