public static void main(String[] args) {
String replace=“1111111111”;
String regex = “(.{3})”;
replace = replace.replaceAll(regex, "$1 ");
System.out.println(replace);
}
结果就是:111 111 111 1
public static void main(String[] args) {
String replace=“1111111111”;
String regex = “(.{3})”;
replace = replace.replaceAll(regex, "$1 ");
System.out.println(replace);
}
结果就是:111 111 111 1
java中字符串拼接的多种方式
加密:为你的长字符串提供最高级别的保护!!!
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M