java怎么由一个字符分割字符串
java怎么由一个字符分割字符串
日期:2016-07-28 12:10:09 人气:1
java分割字符串用split,例如
String sourceStr = "1,2,3,4,5";
String[] sourceStrArray = sourceStr.split(",");
for (int i = 0; i < sourceStrArray.length; i++) {
System.out.println(sourceStrArray[i]);
}
split分隔符总结
1.字符"|",&q