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
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