?
What is the output of the following code snippet?
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");
}
switch (p) {
case 1: System.out.print("One");
case 2: System.out.print("Two");
default: System.out.print("Default");
}
Join the Discussion
Login to post a comment or share your explanation.
Login