Here you can find the source of getArrayListFromCSV(String csvString)
static public ArrayList<String> getArrayListFromCSV(String csvString)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Arrays; public class Main { static final public String CSV_SEPARATOR = ","; static public ArrayList<String> getArrayListFromCSV(String csvString) { return helper1(csvString, CSV_SEPARATOR); }/* ww w .j a v a 2s .c o m*/ static private ArrayList<String> helper1(String ssvString, String separator) { if (ssvString.isEmpty()) return new ArrayList<>(); // Return list with 0 elements as it should be! return new ArrayList<String>(Arrays.asList(ssvString.split(separator))); } }