8장
1. 컬렉션 팩토리
// List.of
List<String> friends = List.of("Raphael", "Olivia", "Thibaut");
// Set.of
Set<String> friends = Set.of("Raphael", "Olivia", "Thibaut");
// Map.of
Map<String, Integer> ageOfFriends =
Map.of("Raphael", 30, "Olivia", 25, "Thibaut", 26);
// Map.ofEntries
Map<String, Integer> ageOfFriends =
Map.ofEntries(entry("Raphael", 30),
entry("Olivia", 25), entry("Thibaut", 26));2. List와 Set 처리
2.1. removeIf 메서드
2.2. replaceAll 메서드
3. Map 처리
3.1. forEach 메서드
3.2. 정렬 메서드
3.3. getOrDefault 메서드
3.4. 계산 패턴
3.5. 삭제 패턴
3.6. 교체 패턴
3.7. 합침
4. 개선된 CuncurrentHashMap
Last updated