|
Would never be able to tell you came to Java from C . . .
The main problem is your for loop is wrong. You're checking to see it i > array.length, when it should be i < array.length.
Anyways, use StringTokenizer to do this, it'll save you a lot of work.
And don't use += with Strings, use StringBuffer. String concatination is very inefficent. Try concating a million strings together, then try it with StringBuffer, and you'll notice a big difference.
|