如何边遍历边移除Collection中的元素

    xiaoxiao2021-03-25  54

    正确方法

    Iterator<Integer> it =list.iterator(); while(it.hasNext){ it.move }

    错误方法

    for(Integer i:list){ list.move(i); }
    转载请注明原文地址: https://ju.6miu.com/read-32890.html

    最新回复(0)