I do not understand why the following conclusion makes sense.
A method for breaking strings on an empty string that returns an array of a string with a length of 1
String[] split = "".split(",");
System.out.println(split.length);
Returns a String array of length 1
String[] split = "Java".split(",");
System.out.println(split.length);
Returns a String array of length 1
How to differentiate?
source
share