Ok, tell me if I am wrong, but here's how I would expect your original code to run:
ENTER WHILE (outer):
line = "item1 250"
tokenizer = new StringTokenizer(line);
ENTER TRY:
ENTER WHILE...
Type: Posts; User: aussiemcgr
Ok, tell me if I am wrong, but here's how I would expect your original code to run:
ENTER WHILE (outer):
line = "item1 250"
tokenizer = new StringTokenizer(line);
ENTER TRY:
ENTER WHILE...
You have to reevaluate tokenizer.hasMoreToken() each time you use the tokenizer.nextToken() method.
Explain to me the reason you have the while loop (the one that says while(true)).