switch(num)
{
case 20: System.out.println(“Executed”);
case 30: System.out.println(num);
case 0: num*=2; System.out.println(num);
break;
case -10: num++; num*=5; System.out.println(num);
default :
System.out.println(“Case is not matching”);
}
Assume num as i) -10 ii) 30
Answers
Answered by
1
Answer:
When num is -10
Output is
-45
When num is 30
Output is
30
60
Hope It Helps
Similar questions