Java: turning a while loop of tokens into a for loop?
currently have this code:
while (tokenizer.hasMoreTokens()) {
int aid = Integer.parseInt(tokenizer.nextToken());
int type = Integer.parseInt(tokenizer.nextToken());
int pos1 = Integer.parseInt(tokenizer.nextToken());
int pos2 = Integer.parseInt(tokenizer.nextToken());
int pos3 = Integer.parseInt(tokenizer.nextToken());
}
but need it as a for loop but note sure how a for loop with tokens would look like. Basically extracting this out of a text file, and after this need to run calculations on pos1, 2 and 3.
Hopefully someone can help me out or point me in the right direction,
Thanks!
Panzer