Java 遍历Map

          Set<Map.Entry<String, String>> aSet = map.entrySet();

                 Iterator<Map.Entry<String, String>> iter = aSet.iterator();

                 while(iter.hasNext()){

                        Map.Entry<String, String> mp = iter.next();

                        System.out.println(mp.getKey()+" => "+mp.getValue());

                 }

 

你可能感兴趣的:(java)