Ok, easy question. I have a string like: "apples;oranges;bananas;" Is there a better way to get this into an array than just readChar() and look for ";"? Or is that the preferred method? Enlightenment please!
Instead of printing out the tokens one by one, you can build your array there. Method countTokens() will come in handy when you initialize your array. HTH Art. [This message has been edited by Art Metzer (edited February 05, 2001).]
Ben, Ben, Ben, There are NO stupid questions. And this is a GOOD question. Without you asking such things, how would I ever keep learning?
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Nov 01, 2000
I know, I know. But it just seemed like the sort of thing I should already know. There are just some things that you feel a little silly when you realize you don't know how to do, or at least not what you consider a good way. Thanks for the tip, btw, it's exactly what I was looking for.