写一个模拟选课系统,两个类:
第一个:单个学生信息
public class Student {
int ID;
String name;
List<Course> CourseSelected = new ArrayList<Course>();
public Student(int num,String name) {
this.ID=num;
this.name=name;
}
public Student() {
}
}
第二个:学生信息列表
public class SCListGo {
public static int NowPos = 0;
List<Student> SCList = new ArrayList<Student>();
}
看教程说在ArrayList中嵌套Set时候要重写HashSet,但是List我不知道。最后从第二个对象中提取Student对象时发现数据丢失了,用debug得到结果如下
错误信息为:Detail formatter error:
Evaluations must contain either an expression or a block of well-formed statements
求大佬指教,怎么解