I have a list of Strings and a String. If the String has any of the lists then I need to remove it.
I'm using the below approach and its working fine. I'm just wondering if this can be replaced using Stream API?
List<String> exclude = getExcludeList();
String phrase = "My test phrase";
for (String str: exclude) {
phrase = phrase.replace(str, "");
}