스트림으로 문자열 연결하기

라헬·2022년 12월 24일
0
String shortMenu = menu.stream().map(Dish::getName).collect(joining(", "));
콤마로 구분해서 합친건데 그냥 joining() 쓰면 된다.
profile
성장하고 싶은 풀스택 개발자

0개의 댓글

Powered by GraphCDN, the GraphQL CDN