Grade g = new Grade("Java一班","Java软件开发一班");
Student stu1 = new Student("慕女神", "女");
Student stu2 = new Student("小慕慕", "男");
//设置关联关系
g.getStudents().add(stu1);
g.getStudents().add(stu2);
最后两句出现空指针报错!!!!
Memories_1
相关分类