将字符串放到字符串数组中

String stationCapacity = "01,12,21,31";
String [] strArr=stationCapacity .split(",");
for (int i = 0; i < strArr.length; i++) {
String str = strArr[i];
System.out.println("str:"+str);
}
}






原文地址:https://www.cnblogs.com/2016-cxp/p/9425974.html