Fargus811 / Competition

0 stars 0 forks source link

task with * #3

Closed trair18 closed 4 years ago

trair18 commented 4 years ago

@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

Fargus811 commented 4 years ago

потому что return sporstsmanList , а надо CoachList

trair18 commented 4 years ago

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)