一、迭代器的基本用法 1、terator的三个方法 next()获得序列的下一个元素 hasNext()判断序列是否还有下一个元素 remove()移除next最近返回的元素,必须在next()之后调用 实例: import typeinfo.pets.*; import java.util.*; Read More
posted @ 2019-08-23 19:44 卑微芒果 Views(272) Comments(0) Diggs(0) Edit