按照指定的字符串拆分字符串,split()方法。
String str3 = "helloworld";
System.out.println(str3.substring(3));
System.out.println(str3.substring(2, 8));
String[] arr = str3.split("ow");
for (String string : arr) {
System.out.println(string);
}
}
添加微信进交流群: opiopi293