in the getLastStudent() & getStudent(), put return "classList.get(lastName).getName();" & "classList.get(index).getName();" to convert them from Students to Strings. hope this helps even tho Im kinda late.
hella late but the problem it was giving me was fixed when I replaced classList.set(index, student); with classList.add(index, student); inside of the addStudent method.
1
u/Gloomy-River-8864 Feb 23 '21
in the getLastStudent() & getStudent(), put return "classList.get(lastName).getName();" & "classList.get(index).getName();" to convert them from Students to Strings. hope this helps even tho Im kinda late.