// ------------------------- 리스트 스트림

list.stream().
distinct() - 중복되는 요소 모두 제거하고 새로운 스트림 반환
sorted() - 정렬
filter(m-> m.startsWith("시작문자열")) - 해당글자로 시작하면 true 아니면 false  
toArray(String[]::new) - 배열생성
.getAsInt() - Integer로 형변환

// --------------------------배열 스트림

Arrays.stream(arr).
mapToInt(m-> m.length()) - 배열 문자열의 길이 출력 
max() - 최대값


//------------------------ 스트림 클래스

Stream.concat(list1.stream(), list2.stream()) - 리스트1과 리스트2 합치기
.collect(Collectors.toList()) - 리스트 형식으로 변환

+ Recent posts