title: Java switch runs all cases if no break
body: <p>I'm confused about this example. if <code>break</code> is deleted then both <code>Today is Saturday</code> and <code>Today is Sunday</code> will be print. I need to know why this happends?</p>
  <pre><code>int day = 4;
  switch (day) {
    case 4:
      System.out.println(&quot;Today is Saturday&quot;);
     // break;
    case 7:
      System.out.println(&quot;Today is Sunday&quot;);
     // break;
   
  }
  </code></pre>
  <p>P.S: to those who are surprised why i asked such a simple question:<br />
  Its been a while i am learning <a href="https://kotlinlang.org/docs/reference/control-flow.html#when-expression" rel="nofollow noreferrer">Kotlin</a>, that does not need to add break in <code>when</code> expression, so it made me confused when i was working on a java project that needs a <code>switch</code> statement</p>