Find the output in the following code snippet int ch=2; switch (ch) { case 1: system.out.println("Desk top"); break; case2: system.out.println("laptop"); case 3: System.out.println ("better than desktop"); }
Answers
Answered by
0
Answer:
Desktop
laptop
better than desktop
Explanation:
There is no break; statement so all 3 get printed.
Similar questions