Write the output of the following code.
int var=5;
switch(var)
{
case 1:
case 2:
var=var+2;
break;
case 3:
var++;
case 4:
var=2*var;
case 5:
var=var+5;
break;
default :
var--;
}
System.out.println(var);
Answers
Answered by
1
Answer:
Where is case 1?
Case 2=2
Case 3=6
Case 4=5
Case 5=5
4
Mark me as BRAINLIEST
Explanation:
Similar questions