按照指定的字符串拆分字符串,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);
}
}

原文地址:https://www.cnblogs.com/wangffeng293/p/13294474.html