This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Show us what you did with split (some code) and what you got.
I like to use delimited strings like this one, with the delimiter first. When you make the string you can choose any delimiter you like. When you parse the string you take the first character for the delimiter. So much cooler than trying to hard code a delimiter character. You can nest strings and all kinds of fun things.
That said, ask yourself if the leading delimiter is causing your problem. You might have to take it off to make split do what you like.
Pulling parts out of strings is so much fun that Java gives you many ways to do it. Look at StringTokenizer, String.split (you're already there), Pattern & Matcher, and Scanner for some options. And there is always indexOf() and substring() if you really want to do it yourself.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi