public class StudentTest {
public static void main(String[] args){
Student123 S1=new Student123();
S1.setName("张三");
S1.setScore(80);
S1.setage(20);
System.out.println(S1.getName());
System.out.println(S1.getScore());
System.out.println(S1.getage());
}
//} 这个大括号移动到代码最后去,让StudentTest作为外部类
public static class Student123{ //这个类声明为静态内部类
或者把Student123移到其它的类文件里面去,然后引入包