Java tutorial
//package com.java2s; //License from project: LGPL import java.util.*; public class Main { private static final String defaultDelimiter = ","; public static List<String> split(String input) { return split(input, defaultDelimiter); } public static List<String> split(String input, String delimiter) { if (input == null || input.isEmpty()) { return Collections.emptyList(); } return new ArrayList<String>(Arrays.asList(input.split(delimiter))); } }