Something like this maybe
ResultSet rs = null;
Map<String, List<Integer>> jobHistory = new HashMap<String,
List<Integer>>();
for (int n = 1; n < 13; n++) {
// the month number is i
// gets some sql data from a db that returns some names and a
number
while (rs.next()) {
String username = rs.getString("username");
int jobcount = rs.getInt("jobcount");
List<Integer> values = jobHistory.get(username);
if (values == null) {
values = new ArrayList<Integer>(13);
values.set(n, jobcount);
jobHistory.put(username, values);
} else {
values.set(n, jobcount);
}
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---