Here you can find the source of split(String s, String s1)
public static String[] split(String s, String s1)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static String[] split(String s, String s1) { StringTokenizer stringtokenizer = new StringTokenizer(s1, s); String as[] = new String[stringtokenizer.countTokens()]; int i = 0; while (stringtokenizer.hasMoreTokens()) { as[i++] = stringtokenizer.nextToken(); }/*from www. ja v a 2s . com*/ return as; } }