In a switch statement, why are all the cases being executed?
<p>I have this code with the switch statement which I got from the <a href="http://stackoverflow.com/questions/8058279/printing-date-in-java-with-ordinal-characters">post</a> , which 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 this, it breaks, as all the cases besides case 1 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 '2', i tried changing the builder to buffer but same response.. could this be a bug or am I making some mistake?</p>
