JAVA中Map集合遍历
时间:2021-09-03 18:10:54
收藏:0
阅读:29
for (Map.Entry<String, String> entry : map.entrySet()) { System.out.println("key= " + entry.getKey() + " and value= " + entry.getValue()); }
for (String key : map.keySet()) { System.out.println("key= "+ key + " and value= " + map.get(key)); }
原文:https://www.cnblogs.com/pxblog/p/15221632.html
评论(0)