如何把一段逗号分割的字符串转换成一个数组?
1 用正则表达式,代码大概为: String [] result = orgStr.split(“,”);
2 用 StingTokenizer ,代码为: StringTokenizer tokener =
StringTokenizer(orgStr,”,”);
String [] result =new String[tokener .countTokens()];
Int i=0;
while(tokener.hasNext(){result[i++]=toker.nextToken();}