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