For循环遍历为什么没有执行??
public void javaCourseSlect(){
System.out.println("欢迎学生:"+this.id+":"+this.name+" 选课!");
Scanner input=new Scanner(System.in);
javaSet st=new javaSet();
for(int i=0;i<3;i++){
System.out.println("请输入课程ID:");
String ID=input.next();
for(javaCourse cr:st.coursesToSelect){
if(cr.id.equals(ID)){
this.courses.add(cr);
System.out.println("选择了课程:"+cr.id+":"+cr.name);
}else{
System.out.println("没找到所需课程!!!");}
}
System.out.println("丢东西了!!!");
}
}