Im playing around with some code for my college course and changed a method from
public boolean removeStudent(String studentName)
{
int index = 0;
f
If you want to remove inside a loop you should use an iterator and its remove method
public boolean removeStudent(String studentName)
{
Iterator itS = students.iterator();
while(itS.hasNext())
{
Student student = itS.next();
if (studentName.equalsIgnoreCasee(student.getName()))
{
itS.remove();
return true;
}
}
return false;
}