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);
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);