我有一个字符串列表,其中大部分是多个单词:
"how are you"
"what time is it"
Run Code Online (Sandbox Code Playgroud)
我想从此列表中的每个字符串中删除空格:
"howareyou"
"whattimeisit"
Run Code Online (Sandbox Code Playgroud)
我知道Collections.replaceAll(list, to replace, replace with),但这仅适用于具有该确切值的字符串,而不是每个字符串中的每个实例。