Computer Science, asked by adityaayushi2712, 7 hours ago

Convert the following if block to switch block if(a==2) (3) System.out.println("two"); else if(s==3) System.out.println("three"); else System.out.println("it's a number')​

Answers

Answered by Amido23
0

switch (a){

case 2:

System.out.println("two");

case 3:

System.out.println("three");

default:

System.out.println("It's a number");

}

Similar questions