Single Choice
Not Set
QWhat will be the value of y after execution of switch statement?
public class Test{
public static void main(String[] args){
int x = 3, y = 4;
switch(x + 3){
case 6: y = 0;
case 7: y = 1;
default: y += 1;
}
}
}
ID: #2142
Java Control Flow
833 views
Question Info
#2142Q ID
Not SetDifficulty
Java Control FlowTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
2
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic