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

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);
}
}






posted @ 2018-08-05 15:34  青蛙跳跳  阅读(7927)  评论(0编辑  收藏  举报