java.util.ConcurrentModificationException in Non Multithreaded Program
问题 Hey SO Guru's im having one heck of a job with this code public void kill(double GrowthRate, int Death) { int before = population.size(); for (PopulationMember p : population) { int[] probs = ProbablityArrayDeath(GrowthRate,Death,(int)p.fitness()); if (probs[RandomNumberGen.nextRandomInt(0, 99)]==0) { population.remove(p); } } System.out.println("Intial Population: "+before+", Deaths:"+(before- population.size())+", New Population: "+population.size()); } When I run my program the first time