10
मुझे इस उदाहरण में java.util.ConcurrentModificationException क्यों नहीं मिल रही है?
नोट: मुझे Iterator#remove()विधि की जानकारी है । निम्नलिखित कोड नमूने में, मुझे समझ नहीं आया कि पद्धति List.removeमें क्यों mainफेंकता है ConcurrentModificationException, लेकिन विधि में नहींremove । public class RemoveListElementDemo { private static final List<Integer> integerList; static { integerList = new ArrayList<Integer>(); integerList.add(1); integerList.add(2); integerList.add(3); } public static void remove(Integer …