62,631
社区成员
发帖
与我相关
我的任务
分享
public class test37 {
public static void main(String[] args)
{
String s1="abc bad jlsdfd ss ";
System.out.println("原来的字符串:"+s1);
String s2=s1.replaceAll(new String(" "),new String("*"));
System.out.println("替换后的字符串:"+s2);
}
}
String str = "啊啊 好 平 了";
System.out.println(str.replaceAll(" ", ""));