Getting around a ConcurrentModificationException
I'm getting a concurrentModificationException, I looked this up and understand why this is, because I am changing the List while iterating over the List.
I'm wondering how I can get around this, I assume I would have to use a normal for loop, with myList.size() as the condition.
However I'm having trouble trying to call the element in question. eg.
myList[i] or myList(i) don't seem to work. I have only used the iterator for loop for lists before.
Is there another way?