Hi there,
Here's the code where I'm having the problem:
StringTokenizer st = new StringTokenizer (inputString, ";");
String wordArray [] = new String [numberOfTokens];
for (int count = 0; count < numberOfTokens; count++)
{
wordArray [count] = st.nextToken();
}
This generates an ArrayIndexOutOfBoundsException. Does anyone have any idea why? The SDK documentation says that it is normally caused by an array index being negative or too high for the array.
But this shouldn't be the case here, should it? I mean, wordArray should never be higher than the number of tokens in st, should it?
Any ideas or comments? Thanks!!