摘要:
public class ListTest { public static void main(String[] args) { CountDownLatch downLatch = new CountDownLatch(10); List list = new ArrayList(); list.add("2"); li... 阅读全文
摘要:
不要在 foreach 循环里进行元素的 remove / add 操作。 remove 元素请使用 Iterator方式,如果并发操作,需要对 Iterator 对象加锁。正例: 反例: subList 也一样 阅读全文