java 的是switch语句报错

这是代码

import java.io.*;
public class Score2 {
	public static void main(String args[])throws IOException
	{
		BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
			System.out.println("Please input s=");
			String str=input.readLine();
			int s=Integer.parseInt(str);
			int flag=s/10;
			System.out.println(flag);
			swtich(flag)
			{
				case 0:
				case 1:
				case 2:
				case 3:
				case 4:
				case 5:
				case 6:System.out.println("不及格");break;
				case 7:System.out.println("及格");break;
				case 8:System.out.println("中");break;
				case 9:System.out.println("良");break;
				case 10:System.out.println("优");break;
				default:System.out.println("Error!");break;
			}
	}
}

这是显示的错误

Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
    Syntax error on tokens, Label expected instead
    Syntax error on token "case", assert expected
    Syntax error on token "case", assert expected
    Syntax error on token "case", assert expected
    Syntax error on token "case", assert expected
    Syntax error on token "default", invalid Label
    Syntax error on token "}", delete this token

    at Score2.main(Score2.java:12)
 

仔细看看 switch拼错了

我这里编译没有任何问题

switch语句使用详解,https://edu.csdn.net/course/detail/2981

单词拼错了,改成  

switch  即可

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,欢迎您加入CSDN!

目前问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632