title: Why does "switch" in Java rely on "break"?
body: <pre><code>class switch1
  {
      public static void main(String args[])
      {
          int a = 10;
          switch(a)
          {
              default: System.out.println("Default");
              case -1: System.out.println("-1");
          }
      }
  }
  </code></pre>
  
  <p>I understand that this program will execute both "default" and "case -1" statements as break is not specified after the matching condition (in this case after "default").</p>
  
  <p>But what I fail to understand is</p>
  
  <p>a) why is <code>break</code> needed in a <code>switch</code> statement?</p>
  
  <p>b) why does it even execute the invalid matching conditions' statements (i.e executing "case -1")) if all it does is matching?</p>