CS计算机代考程序代写 Java //SwitchExample.java – Demonstrates the switch statement

//SwitchExample.java – Demonstrates the switch statement
public class SwitchExample {
public static void main (String args[]) {
char x = ‘b’;
switch(x) {
case ‘a’:
System.out.println(“Chracter = a”);
break;
case ‘b’:
System.out.println(“Character = b”);
break;
default:
System.out.println(“Other character”);
break;
}
}
}