'HashMap'은 Map을 구현했으므로 map의 특징인 키와 값을 묶어서 하나의 데이터로 저장한다는 특징을 가지고 있습니다
scores.put("Alice", 95);
int aliceScore = scores.get("Alice");
scores.remove("Charlie");
boolean containsKey = scores.containsKey("Bob");
boolean containsValue92 = scores.containsValue(92);
int size = scores.size();
boolean isEmpty = scores.isEmpty();
scores.clear();
for (String key : scores.keySet()) {
System.out.println("Key: " + key);
}
for (int value : scores.values()) {
System.out.println("Value: " + value);
}
for (Map.Entry<String, Integer> entry : entrySet) {
String key = entry.getKey();
int value = entry.getValue();
System.out.println("Key: " + key + ", Value: " + value);
}