void (List<String> list) { String result = list.stream().filter(Objects::nonNull).coll<caret>ect(StringBuilder::new, (sb, str) -> sb.append(str), StringBuilder::append).toString(); System.out.println(result); }