I have tried to iterate a list and if the object contains specific character i have to remove the object but it throws concurrentmodificationexception because iterate has been aware of what is modified.so i tried with for loop but its not working properly.
If i execute this objects in the list is not removed completely.I debugged the code the objects are swapped once its removed.
Please suggest me how to avoid concurrentmodificationexception
All search starts with beginner's luck and all search ends with victor's severly tested.
It should be rather obvious that if you remove, say, the second element, then the third element takes its place. To remove elements in a for loop, start at the highest numbered element and proceed toward zero.
There are no new questions, but there may be new answers.