java 编程 switch 语句 模拟单项选择题,根据你的选择,给出对应的答案(表

2025-01-20 16:33:17
推荐回答(1个)
回答1:

char ch='C';
switch (ch) {
case 'A':
System.out.println("you are wrong ");
break;
case 'B':
System.out.println("you are wrong ");
break;
case 'C':
System.out.println("you are right ");
break;
case 'D':
System.out.println("you are wrong ");
break;
}