private static String[] convert(String arg){
  StringTokenizer tok=new StringTokenizer(arg," ,");
  String[] array=new String[tok.countTokens()];
  int i=0;
  while (tok.hasMoreTokens()) {
    array[i]=tok.nextToken();
    i++;
  }
  return (array);
}

private static String [ ] convert ( String arg ) { StringTokenizer tok = new StringTokenizer ( arg , " ," ) ; String [ ] array = new String [ tok . countTokens ( ) ] ; int i = 0 ; while ( tok . hasMoreTokens ( ) ) { array [ i ] = tok . nextToken ( ) ; i ++ ; } return ( array ) ; }
convert comma - separated string to array of strings
