I am trying to create a queue of tokens from a file and I have the following;
Scanner pScanner = new Scanner (System.in);
String ptoken;
While ((tak = tz.getNext()) !=null)
{
System.out.println ("The next token is " + tak);
.......//more code
}
This works becuase it scans every token, however when I add or delete a token it skips the next token that the above println showed and adds the next token. Can someone please help me?