Hi all,
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
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