State the output of the following code?
int choice =1, x =0, y=0, z=0;
switch( choice++)
{
case 2: x++;
y--;
z++;
break;
case 3: x+ =2;
y+= 3;
z- = 3;
default: ++x;
++y;
++z;
}
System.out.println( “x =”+x+”y=”+y+”z=”+z) ;
Answers
Answered by
2
Answer:
sorry.....I can't understand your question.......
Answered by
1
OUTPUT: x =1y=1z=1
case will switch to default statement as choice is 1 at that time.
Similar questions