Stream 중간 연산
주요 메서드 스트림 필터링 : filter(), distinct() 스트림 변환 : map(), flatMap() 스트림 제한 : limit(), skip() 스트림 정렬 : sorted() 스트림 연산 결과 확인 : peek() 스트림 필터링 .filter() : .distinct() : 해당 스트림에서 중복된 요소가 제거된 새로운 스트림 return IntStream stream1 = IntStream.of(7, 5, 5, 2, 1, 2, 3, 5, 4, 6); IntStream stream2 = IntStream.of(7, 5, 5, 2, 1, 2, 3, 5, 4, 6); // 스트림에서 중복된 요소를 제거함. stream1.distinct().forEach(e -> System.out.print(..
2022. 7. 19.