0
的返回类型为查找(ID)方法,为什么系统始终坚持认为需要教练的返回类型,我想我已经声明, “入口”是指导教师。对于查找(ID)方法,为什么系统,总是坚持要求教师
// 1. TO DO
/** findID(String) is passed an id and returns the
* Instructor object in the Instructor arraylist having that
* id or null if not found
* @return
*/
public Instructor findID (String id) {
for (Instructor entry:instList) {
if (entry.getId().equals(id) == true) {
return entry;
} else return null;
}
}
是否'instList'集合有一个通用的类型? – Roman