Another ConcurrentModificationException question
I've searched StackOverflow and there are many ConcurrentModificationException questions. After reading them, I'm still confused. I'm getting a lot of these exceptions. I'm using a "Registry" setup to keep track of Objects: public class Registry { public static ArrayList<Messages> messages = new ArrayList<Messages>(); public static ArrayList<Effect> effects = new ArrayList<Effect>(); public static ArrayList<Projectile> proj = new ArrayList<Projectile>(); /** Clears all arrays */ public static void recycle(){ messages.clear(); effects.clear(); proj.clear(); } } I'm adding and removing objects