title: In a switch statement, why are all the cases being executed?
body: <p>I have this code with the <code>switch</code> statement which I got from this <a href="https://stackoverflow.com/questions/8058279/printing-date-in-java-with-ordinal-characters">post</a>, and it works absolutely fine:</p>
  
  <pre><code>String getOrdinal(final int day) {
      if (day &gt;= 11 &amp;&amp; day &lt;= 13) {
          return "th";
      }
      switch (day % 10) {
          case 1: return "st";
          case 2: return "nd";
          case 3: return "rd";
          default: return "th";
      }
  }
  </code></pre>
  
  <p>But if I change it to something like the following, it breaks, as all the cases besides <code>case 1</code> gets executed:</p>
  
  <pre><code>  static String getOrdinal(final int day) {
      StringBuilder ordinalBuilder = new StringBuilder();
      ordinalBuilder.append("&lt;sup&gt;");
      if (day &gt;= 11 &amp;&amp; day &lt;= 13) {
          ordinalBuilder.append("th") ;
      }
      switch (day % 10) {
          case 1: ordinalBuilder.append("st");
          case 2: ordinalBuilder.append("nd");
          case 3: ordinalBuilder.append("rd");
          default: ordinalBuilder.append("th");
      }
      ordinalBuilder.append("&lt;/sup&gt;");
     return ordinalBuilder.toString();
   }
  </code></pre>
  
  <p>This prints <code>2&lt;sup&gt;ndrdth&lt;/sup&gt;</code> when I pass in <code>2</code>. I tried changing the builder to buffer but I got the same response... Could this be a bug or am I making some mistake?</p>