Sail E0 Webinar
Question
What 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;
}
}
}
Options:
A .  1
B .  2
C .  3
D .  4
E .  0
Answer: Option B

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers