Vidyalelo
Java Programming · Q28

Flow Control

Programming · Java Programming · question 28

Q28

What is the output of the following code snippet?int p = 3;switch (p) case 1: System.out.print("One"); case 2: System.out.print("Two"); default: System.out.print("Default");

A.
Default
B.
OneTwoDefault
Answer
C.
One
D.
One Default

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board