Java split() method strips empty strings at the end? [duplicate]

You can specify to apply the pattern as often as possible with:

String[] de = data.split(";", -1);

See the Javadoc for the split method taking two arguments for details.

Leave a Comment