Clearing an ArrayList

I also assumed that display() is causing this.

You could set a cleared boolean to true and in display() within the for loop check it and on true leave with return;