The method changes the value at index to be e and returns the previous value at index.
index
e
studentList