import java.util.*;
public class Test {
public static void main(String[] args) { //此行有错!
int score;
Scanner scanner=new Scanner(System.in);
System.out.println("请问您的成绩是多少?(0-100)");
score=scanner.nextInt();
if ((score>100) || (score<0))
System.out.println("输入错误!");
else if(score>=90)
System.out.println("您的成绩是优");
else if(score>=80)
System.out.println("您的成绩是良!");
else if(score>=60)
System.out.println("您的成绩是及格!");
else
System.out.println("您的成绩是不及格,必须补考!");
}
}
错误:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
String cannot be resolved to a type
Scanner cannot be resolved to a type
Scanner cannot be resolved to a type
System cannot be resolved to a variable
System cannot be resolved
System cannot be resolved
System cannot be resolved
System cannot be resolved
System cannot be resolved
System cannot be resolved
at Test.main(Test.java:4)