为什么类名+对象名,可以被当做参数传进方法中去??
public void testForEachForSet(Student student){
for(Course cr:student.courses){
System.out.println("选择了课程"+":"+cr.id+cr.name);
}
}
public void testForEachForSet(Student student){
for(Course cr:student.courses){
System.out.println("选择了课程"+":"+cr.id+cr.name);
}
}
2016-05-22
举报