62,615
社区成员
发帖
与我相关
我的任务
分享
class Entity{
int radio;
int app_id;
//还可以有其它信息
}
你是信息过去,map的值放入不够用是吧,然后把你们map的value设为你自定义的对像
HashMap<Integer, Entity> entityList = new HashMap<Integer, Entity>();
while (rs.next()) {
int radio = 0;
if (rs.getInt("app_id") != null) {
app_sum.put(rs.getInt("app_id"), app_sum.get(rs.getInt("app_id")) + radio);
count++;
app_day.put(rs.getInt("app_id"), count);
entityList.put();//把东西放之里面
} else {
app_sum.put(rs.getInt("app_id"), radio);
app_day.put(rs.getInt("app_id"), 1);
count = 1;
}
}