-
Scanner cannot be resolved to a type
未导入,解决:在开头插入
import java.util.Scanner;
-
cannot be resolved to a variable
解决:检查赋初始值
-
cannot be resolved or is not a filed
检查导入包是否正确
-
Resource leak:' scores' is never closed
在结尾加上
scores.close()
-
duplicate local variable average
重复定义,或同名变量
-
the assignment to variable tel has no effect
无效语句
-
Systax error on token(s),misplaced construct(s)
可能是类与类之间还导入了一个包
-
eclipse不运行当前代码
检查main是否存在且正确,大括号是否成对