方法一:利用StringBuilder public String replaceSpace (String s) { //利用StringBuider存储更改后的字符 StringBuilder s1=new StringBuilder(); &n...