string 去除所有空格 我会溜馍 2022-04-07 201 阅读1分钟 string 去除所有空格 String id=" wh z "; String str2 = id.replaceAll(" ", ""); System.out.println(str2); 返回结果 whz