Original Post
Hello folks! I have an ArrayList, arr. To this arraylist, I add/remove items (by pressing Enter/Esc). In my thread, I loop through this arraylist and print out all the elements. But if I add/remove one item exactly while the thread is reading from the arraylist, I get the ConcurrentModificationException. How do I solve this? I think I should use "synchronized" somehow? I don't get it to work... Anyone? Kind Regards