Set set = hm.entrySet();
Iterator i = set.iterator();
while (i.hasNext()) {
Map.Entry me = (Map.Entry)i.next();
// me.getValue should point to an arraylist
Iterator<Student> it = (me.getValue()).iterator();
while (it.hasNext()) {
// some code
}
}
Ok, I tried iterating over an Arraylist and for some reason it doesn't work, the compiler tells me that it cannot find the symbol. I know that me.getValue() should point to an object and in this case the value part of the key/value pair is an Arraylist. So, what's wrong?