Here you can find the source of split(String text)
public static List<String> split(String text)
//package com.java2s; //License from project: LGPL import java.util.ArrayList; import java.util.List; public class Main { public static List<String> split(String text) { List<String> parts = new ArrayList<>(); if (text != null) { String[] split = text.split(","); for (String part : split) { parts.add(part.trim());/*w ww. ja v a 2s.com*/ } } return parts; } }