for(ClassA key : myMap.keySet()) {
System.out.println(key);
System.out.println(myMap.get(key);
}
보다는..
for(Map.Entry<ClassA, ClassB> entrie : myMap.entrySet()) {
System.out.println(entrie.getKey());
System.out.println(entrie.getValue());
}
for(ClassA key : myMap.keySet()) {
System.out.println(key);
System.out.println(myMap.get(key);
}
보다는..
for(Map.Entry<ClassA, ClassB> entrie : myMap.entrySet()) {
System.out.println(entrie.getKey());
System.out.println(entrie.getValue());
}