迭代器(Iterator)的方法

(1) iterator()要求容器返回一个Iterator。

(2) next()获得序列中的下一个元素。

(3) hasNext()检查序列中是否还有元素。

(4) remove()将迭代器新返回的元素删除。

原文地址:https://www.cnblogs.com/Cyan-W/p/5017463.html