Hear is my question for simple switch statement
class MissingBreak
{
public static void main(
String[] args)
{
int i =0;
switch (i)
{
case 0:
System.out.println("i is 0");
case 1:
System.out.println("i is 1");
}
}
}
I declared the i value as 0 then only the case with 0 should execute then why case 1 is executing?
I read in the book that break is optional?
Please tell me how the flow is going?
Thanks in advance
Suma