Here you can find the source of split(String left, String separator)
private static List<String> split(String left, String separator)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { private static List<String> split(String left, String separator) { List<String> results = new ArrayList<>(); if (left == null || left.isEmpty()) return results; for (String str : left.split(separator)) { if (str != null && !str.isEmpty()) results.add(str);/*from www .j a v a2 s . co m*/ } return results; } }