请大家帮忙看看这个问题出现在哪里? 谢谢了
public class Student1 {static String words = "全局变量";
public void getStu(){
String words = "局部变量";
System.out.println("words 变量现在是:"+words);
System.out.println("访问全局变量:"+this.words);
}
public static void main(String[]args){
Student1 student = new Student();
student.getStu();
}
}
出现的错误是
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Student cannot be resolved to a type
at Student1.main(Student1.java:10)