@Override public Coach findById(int id) { Coach fake = new Coach(); fake.setId(id); int index = coachList.indexOf(fake); return sportsmanList.get(index); }
understand why this code doesn't work in current version
method indexOfuse equals() for search object in list. You didn't implement it, so they didn't work. Now it should be right.
(Boyz, correct me if i wrong)
@Override public Coach findById(int id) { Coach fake = new Coach(); fake.setId(id); int index = coachList.indexOf(fake); return sportsmanList.get(index); }
understand why this code doesn't work in current version
Originally posted by @trair18 in https://github.com/Fargus811/Competition/issues/2#issuecomment-555160399