I have a Hashmap and a set of keys. For each key, I want to perform a task depending on whether or not it is present in the hashmap. Can someone show be a way to do this? I'm using Struts and JSPs in my application
+1
A:
This question is old, but, were you trying to do something like this?:
for (String key : setOfKeys) {
if (hm.containsKey(key)) {
doSomething(hm, key);
}
}
Jorge Gajon
2009-05-08 17:35:32