特牛生活网

遍历HashMap——HashMap遍历的四种方式_遍历map的四种方式-CSDN博客

网友收藏
文章浏览阅读179次。1. 通过Map.Entry<>遍历Map<Integer, Integer> map = new HashMap<Integer, Integer>();map.put(1,2);map.put(2,3);for(Map.Entry<Integer,Integer> entry : map.entrySet()){ System...._遍历map的四种方式