Here you can find the source of getArrayListFromString(String wordSequence, String separator)
public static ArrayList<String> getArrayListFromString(String wordSequence, String separator)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static ArrayList<String> getArrayListFromString(String wordSequence, String separator) { ArrayList<String> array = new ArrayList<String>(); if (wordSequence != null) { StringTokenizer toks = new StringTokenizer(wordSequence, separator); while (toks.hasMoreTokens()) array.add(toks.nextToken()); }/* w w w. ja v a 2 s .com*/ return array; } }