方法1: get
Map<String, Object> map =newHashMap<String, Object>(); List
map.put("key1","value1"); map
map.put("key2","value2"); 方法
List<Map<String, Object>> list =newArrayList<Map<String, Object>>(); new
list.add(map);
for(Map<String, Object> m : list) {
for(String k : m.keySet()) {
System.out.println(k +" : "+ m.get(k));
}
}
方法2:
for(Map<String,Object> map:list){ for(Map.Entry<String,Object> e:map){ e.getKey() 和 e.getValue() 就是你想要的 } }