Java , Removing object from ArrayList
问题 I have ClassA which has a static ArrayList of Objects public static ArrayList<Meteorit> meteorits = new ArrayList<Meteorit>(); Now I want to remove an object from this list like this ClassA.meteorits.remove(this); This is written in Meteorit class . But it throws exception when I want to use the objects in the ArrayList . Exception in thread "LWJGL Application" java.util.ConcurrentModificationException I used Iterator to remove objects from ArrayList but now I dont have an idea how to use it