Programming Tips - Java: Why is String.split() not giving me empty strings?

Date: 2012may11 Language: Java Q. Java: Why is String.split() not giving me empty strings?
String subject = ":"; String []a = subject.split(":");
Gives me an a.length == 0 but I expect 2. A. Regular split (helpfully) deletes trailing empty strings. So use the other form of split:
String subject = ":"; String []a = subject.split(":", -1);