为什么会报错呢?
这是Student类
package com.imooc.collection;
import java.util.HashSet;
import java.util.Set;
public class Student {
public String id;
public String name;
public Set<Course> courses;
public Student(String id, String name) {
// TODO Auto-generated constructor stub
this.id =id;
this.name = name;
this.courses = new HashSet<Course>();
}
}
这是在main 中定义的student对象
Student student = new Student("1","小明");
为什么会报错呢求大神解答