Computer Science, asked by sehajmaina, 1 year ago

solve the correct output of the following code snippet when:
(i) opn = 'b'
(ii) opn = 'x'
(iii) opn = 'a'.
switch (opn)
{
case 'a': System.out.println("Jai Jagat");
break;
case 'b': System.out.println("World Unity');
case 'c':System.out.println("Global Citizen");
break;
default: System.out.println("Invalid Input");
}​

Answers

Answered by brainological
2

Answer:

hi buddy...

  • When the user will enter the option 'a' the system will give the output stating Jai Jagat.....
  • When the user will enter the option 'b' the system will give the output stating World Unity......
  • When the user will enter the option 'c' the system will give the output stating Global Citizen......
  • And if the user enters a wrong choice the output shown will be Invalid Input.......

Hope that helps you

please mark as Brainliest if helpful

Similar questions