将Map是根据关键字来获得对象的,但有的时候需要遍历Map中的值,则通过下面的值将其转化:
Map<String,String> map =new HashMap();
map.put("01", "123");
map.put("02", "456");
Set<Entry<String,String>> set =map.entrySet();
for(Entry<String,String> e:set){
System.out.println(""+e.getKey()+";value"+e.getValue());
}