摘要: 向集合添加自定义的对象,则一定要重写equals方法, 向set或map的key中添加自定义的对象,则一定要重写hashcode()方法。 1.迭代器 接口 Iterator<E> Iterator i=new Iterator (); 遍历解析: 首先i指向集合开头的上一个位置。调用hasNext 阅读全文
posted @ 2019-07-06 16:58 Strong_stone 阅读(296) 评论(0) 推荐(0) 编辑