public class D {
public static void main(String[] args) {
String b = "Hello Java World";
System.out.println("原字符串:"+b);
/*把字符串转化为数组形式,并用正则表达式进行分割*/
String [] c = b.split("\s+");
for (String ss : c){
System.out.println(ss);
}
}
public class D {
public static void main(String[] args) {
String b = "Hello Java World";
System.out.println("原字符串:"+b);
/*把字符串转化为数组形式,并用正则表达式进行分割*/
String [] c = b.split("\s+");
for (String ss : c){
System.out.println(ss);
}
}