Q:

switch statement with an default clause at the beginning java

The following code prints out  1,2,3 , if i change int i = 3; it will print out 3. I was wondering the reason behind this. I used debugger and it seems if i = 3 it goes to case 3 and print out 3 then program terminated.I believe when i=5, it goes to default , does this mean case 1,case 2 and case 3 all belong to the default clause? 
int i = 5;
switch(i){
default:
case 1:
    System.out.println(1);
case 2:
    System.out.println(2);
case 3:
    System.out.println(3);

}

Edit:
This question was from a test and it asks for the output for this code. So I am trying to figure out why the output is 1,2,3, i understand break; is needed but that is not what i wanted for the answer.

A:

i == 5 doesn't match any of your cases, so control goes to default clause. 
default clause is empty, with no break statement, and it immediately falls through to the case below — case 1 in your code. 
case 1 prints "1" and, as it also doesn't have a break statement, falls through to case 2, and so on. 

cases 1, 2, 3 do not belong to default — what matters is their order.
If you would reorder your switch statement and would write default clause as the last one, it would print nothing. 

