Java Modcount (ArrayList)

后端 未结 6 1664
既然无缘
既然无缘 2020-12-08 07:01

In Eclipse, I see that ArrayList objects have a modCount field. What is its purpose? (number of modifications?)

6条回答
  •  隐瞒了意图╮
    2020-12-08 07:16

    From the Java API for the mod count field:

    The number of times this list has been structurally modified. Structural modifications are those that change the size of the list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.

提交回复
热议问题