HashMap hashMap = new HashMap();
Set entrySet = hashMap.entrySet();
Iterator iterator = entrySet.iterator();
while (iterator.hasNext()){
Map.Entry entry = (Map.Entry) iterator.next();
System.out.println(entry.getKey() + ">" + entry.getValue());
}
基于java的HashMap遍历
最新推荐文章于 2024-09-05 11:00:53 发布