|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Infinte loop?
When I uncomment this loop, the page just hangs forever.
I suspect it's looping infintly. Code:
int i = 0;
while(tokens.hasMoreTokens())
{
del_arr[i] = tokens.nextToken();
i++;
}
|
|
#2
|
|||
|
|||
|
Yes, it should as long as it runs out of tokens.
How big is the String that you are tokenizing? and What is your delimeter? Please, post your code include the setup of the Tokenizer so that we can get a better Idea of whats going on. |
|
#3
|
||||
|
||||
|
it's something like 6542,6546,6542
I figured it out though. I wasn't calling nextToken(), so it was always evaluating to true. My problem now is that the array i'm trying to store the token in is giving me a headeache. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Infinte loop? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|