📜  迭代器和列表迭代器之间的区别 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:02.485000             🧑  作者: Mango

代码示例1
Iterator vs ListIterator
1) The Iterator traverses the elements in the forward direction only.
ListIterator traverses the elements in backward and forward directions both.
2) The Iterator can be used in List, Set, and Queue.
ListIterator can be used in List only.
3) The Iterator can only perform remove operation while traversing the 
collection.
ListIterator can perform add, remove, and set operation while traversing
the collection.