且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

迭代器和listiterator之间的区别

更新时间:2023-01-14 11:40:07

在这两种类型中,您都可以删除最后检索到的元素.
使用ListIterator,您还可以替换最后一个项目.

您更改基础集合的行为是不确定的.

请参见此处 [此处 [
In both type you can remove the last element retrieved.
With the ListIterator, you can also replace the last item.

The behaviour should you change the underlying collection is undefined.

See here[^] and here[^]