What is the output of the following code?
public class Main { public static void main(String args[]) { int x = 3;/* w ww.j a v a 2 s . c o m*/ int y = 3; switch (x + 3) { case 6: y = 1; default: y += 1; } System.out.println(x); System.out.println(y); } }
Click to view the answer
3 2