Here you can find the source of stringToList(String s)
public static List stringToList(String s)
//package com.java2s; import java.util.*; public class Main { public static List stringToList(String s) { return stringToList(s, null); }/*ww w . jav a 2 s .c om*/ public static List stringToList(String s, String delimiter) { List newList = new ArrayList(); StringTokenizer st; if (delimiter != null) st = new StringTokenizer(s, delimiter); else st = new StringTokenizer(s); while (st.hasMoreTokens()) { newList.add(st.nextToken()); } return newList; } }