摘要: 1. Iterator接口 java.util.Iterator接口作用:遍历集合中的所有元素。 Iterator和Collection、Map接口有所不同: Iterator主要用于迭代访问(即遍历)Collection中的元素,因此Iterator对象也被成为迭代器。 Collection、Ma 阅读全文
posted @ 2021-11-17 21:00 白森 阅读(132) 评论(0) 推荐(1) 编辑
摘要: Collection介绍 Collection 层次结构中的根接口。 Collection表示一组对象,这些对象也称为collection的元素。 JDK 不提供此接口的任何直接实现:它提供更具体的子接口(如 Set 和 List、Queue)实现。此接口通常用来传递 collection,并在需要 阅读全文
posted @ 2021-11-17 19:19 白森 阅读(333) 评论(0) 推荐(0) 编辑