List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); Map<String, Object> map = new HashMap<String, Object>(); map.put("key1", "value1"); map.put("key2", "value2"); list.add(map); for (Map<String, Object> m : list) { for (String k : m.keySet()) { System.out.println(k + " : " + m.get(k)); } }
时间: 2024-10-31 22:22:41