map的输出

map的输出

  Map<String,String> map=new HashMap<>();
  map.put("a","a");
  map.put("b","b");
  map.put("c","c");
  Set<Map.Entry<String, String>> entries = map.entrySet();
  Iterator<Map.Entry<String, String>> iterator = entries.iterator();
  while (iterator.hasNext()){
Map.Entry<String, String> entry = iterator.next();
System.out.println(entry);
  }

 

 

posted @ 2019-12-03 22:39  ZJfor  阅读(758)  评论(0编辑  收藏  举报