String truncation is essential in daily development, but the Split Truncation in JAVA has some characteristics, such as: String str = 1, 2, 3; so str. split (","); the length after truncation is 3, but in some cases, such interception may cause trouble, such as String str = "1, XXX Road, XX Company, www. XXXX. COM, James, "// ID, address, company, URL, name, remarks in this case if you directly call str, split (","); the comment cannot be intercepted, but in the case that the remarks need to be assigned to a TextView, the comment will be out of the border because the length is 5, but the remarks are obviously in the 6th-bit format. How can this problem be solved? You only need to call str. split (",",-1); to solve the problem. After this is called, even if there is no data, a blank line is generated. If it is null, the string length is 0, not null