title: Should the default case of switch statment have a break?
body: <p>Example <a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html" rel="nofollow">from Oracle</a></p>
  
  <pre><code>public class SwitchDemo {
      public static void main(String[] args) {
  
          int month = 8;
          String monthString;
          switch (month) {
              case 1:  monthString = "January";
                       break;
              case 2:  monthString = "February";
                       break;
              case 3:  monthString = "March";
                       break;
              case 4:  monthString = "April";
                       break;
              case 5:  monthString = "May";
                       break;
              case 6:  monthString = "June";
                       break;
              case 7:  monthString = "July";
                       break;
              case 8:  monthString = "August";
                       break;
              case 9:  monthString = "September";
                       break;
              case 10: monthString = "October";
                       break;
              case 11: monthString = "November";
                       break;
              case 12: monthString = "December";
                       break;
              default: monthString = "Invalid month";
                       break; //why is there a switch statement here?
          }
          System.out.println(monthString);
      }
  }
  </code></pre>
  
  <p>The page explains</p>
  
  <blockquote>
    <p>Technically, the final break is not required because flow falls out of
    the switch statement. Using a break is recommended so that modifying
    the code is easier and less error prone. The default section handles
    all values that are not explicitly handled by one of the case
    sections.</p>
  </blockquote>
  
  <p>I'm not sure if the second sentence is justifying the use of breaks in switch statements in general or is specifically saying adding a break statement to the end makes code less error prone. If I'm throwing an exception in the default case is there a point to calling break afterwards or is this a waste? In Netbeans a red ! appears beside the unreachable break statement but it compiles fine. </p>
  
  <p>Regarding readability, how should a case block be formatted if the code that runs when the condition is met spans several lines? For example instead of just <code>monthString = "January";</code> there's 10 lines of code with loops and things?</p>
  
  <p>I'm using the switch to test if the user entered the number for option 1, 2 or 3. </p>