public static String[] split(String line,String delim){
  List list=new ArrayList();
  StringTokenizer t=new StringTokenizer(line,delim);
  while (t.hasMoreTokens()) {
    list.add(t.nextToken());
  }
  return (String[])list.toArray(new String[list.size()]);
}

public static String [ ] split ( String line , String delim ) { List list = new ArrayList ( ) ; StringTokenizer t = new StringTokenizer ( line , delim ) ; while ( t . hasMoreTokens ( ) ) { list . add ( t . nextToken ( ) ) ; } return ( String [ ] ) list . toArray ( new String [ list . size ( ) ] ) ; }
create a string array from a string separated by delim
