Further along in the documentation it states
So in the case of ",".split(","), we have one matching substring, ",". And there are two substrings that are either terminated by a matching substring or end of the string, "" and "". So, something is false here? Or am I understanding it wrong? Where does it say that a substring can't have a length of 0?
";" would be split into "" and "", but both are trailing empty strings and discarded before the method returns.
If n is zero then the pattern will be applied as many times as possible, the array can have any length, and trailing empty strings will be discarded.