package programmers; public class 꼬리_문자열_Java_230831 { public String solution ( String [] str_list , String ex ){ StringBuilder answer = new StringBuilder (); for (String str : str_list){ answer. append (str. contains (ex) ? "" : str); } return answer. toString (); } public String solution_stream ( String [] str_list , String ex ) { return Arrays. stream (str_list) . filter (str -> ! str. contains (ex)) . collect (Collectors. joining ()); } } package programmers import java.util.stream. C ollectors class 꼬리_문자열_ K otlin_230831 { fun solution(str L ist: A rray< S tring>, ex: S tring): S tring { val answer = S tring B uilder() for (str in str L ist) { answer.append( if (str.contains(ex)) "" else str) } return answer.to S tring() } fun solution S tream(str L ist: A rray< S