As for the theoretical aspects of the said, you can view the API, now mainly give a few examples to illustrate the difference between:
Example one:
String sample1= "Ben Ben"; With a 8-space interval between Ben.
string[] split1 = Sample1.split (""); Isolate by a space
Final list<string> olines = new arraylist<string> ();
Final StringTokenizer tokens = new StringTokenizer (Sample1, "");
Results: Split1.length was 9 olines.size as 2
Explanation: If split is separated, he will save the space as a string into the array, and Tokenizer will not
Example two:
String T1 = "Ben,,,,,, Ben";
string[] Split2 = T1.split (",");
Final listolines = new ArrayList ();
Final StringTokenizer tokens = new StringTokenizer (T1, ",");
Results: Split2.length was 7 olines.size as 4
Explanation: Tokenizer He's going to have to process the same continuous filter.
Summary: Especially in the space filter, as far as possible with Tokenizer, if the split is likely to appear many, do not want the data such as space (I have encountered)