要实现什么功能`按什么要求分组``有什么样数据?
public static Map
Map
try {
if (rs.getRow() > 0) {
result = new HashMap
while (rs.next()) {
Long key = rs.getLong(1);
Long value = rs.getLong(2);
if (result.containsKey(key)) {
result.get(key).add(value);
} else {
List
valueList.add(value);
result.put(key, valueList);
}
}
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
}
比如说,....