Computer Science, asked by devendrakumarpandey4, 7 months ago

find the output



I)if (x=1) ii) if ( x=2) [2 + 2]

int a=10,b=5;

switch(x)

{

case 1:

a++;

case 2:

b--;

break;case 3:

++a;

default :

b++;

}

System.out.println(“a=”+a+”b=”+b);​

Answers

Answered by Oreki
1

Answer:

I. a = 11, b = 4

II. a = 10, b = 4

Similar questions