Here you can find the source of stringToListStr(String input)
public static List<String> stringToListStr(String input)
//package com.java2s; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { private static final String COMMA = ","; public static List<String> stringToListStr(String input) { List<String> outList = new ArrayList<String>(); if (null == input || input.trim().isEmpty()) { return outList; }/*from w w w . j a v a2 s . co m*/ String[] out = input.split(COMMA); return Arrays.asList(out); } }