我可以用这个:
String str = "TextX Xto modifyX";
str = str.replace('X','');//that does not work because there is no such character ''
Run Code Online (Sandbox Code Playgroud)
有没有办法X从Java中的String中删除所有出现的字符?
我试过这个并不是我想要的: str.replace('X',' '); //replace with space