Scanner scanner=new Scanner(System.in);
System.out.println("请输入a/b/c/d/e/f/g任意一个字符");
char days=scanner.next().charAt(0);
switch (days){
case 'a':
System.out.print("今天是星期一");
break;//退出Switch
case 'b':
System.out.print("今天是星期二");
break;
case 'c':
System.out.print("今天是星期三");
break;
case 'd':
System.out.print("今天是星期四");
break;
case 'e':
System.out.print("今天是星期五");
break;
case 'f':
System.out.print("今天是星期六");
break;
case 'g':
System.out.print("今天是星期日");
break;
default:
System.out.print("输入错误!!!");
}
06-06
06-09
1498
12-20
932