在以下四种遍历过程中,前两种会抛出ConcurrentModificationException,而后两种方法是正确的. Department类: package com.sitinspring; import java.util.ArrayList;import java.util.Iterator;import java.util.List; public class Department { private String name; private List<Member> mem
// free the contents of the list; erase the list inline void ListDelete (list <void *> *pList) { if (pList) { list <void *>::iterator iNext; for (iNext = pList->begin (); iNext != pList->end (); ++iNext) free (*iNext); pList->erase (p