// 1.
for (Map.Entry < string string = "" > entry : hashmap.entrySet ()) {
System.out.println(entry.getKey() + " = " + entry.getValue());
}
// 2.
for (String key : hashmap.keySet()) {
System.out.println(hashmap.get(key));
}
// 3.
for (Map.Entry e = itr.next(); itr.hasNext(); e = itr.next()) {
Object o1 = e.getKey();
Object o2 = e.getValue();
}
|