About Question enthuware.ocajp.i.v8.-2.-1313 :
Posted: Mon Jan 11, 2016 11:13 am
What is the result of executing the following code when the value of i is 5:
Right answer is "1 0 2" (the same wrote in explanation), but in test "Nothing will be printed." marked as right answer.
Code: Select all
switch (i){
default:
case 1: System.out.println(1);
case 0: System.out.println(0);
case 2: System.out.println(2); break;
case 3: System.out.println(3);
}