Does in.next() regardless of how it is used always return the token and move to the next token?
Write a small test program for testing and see what it does.
One easy way to test without having to use the console is to use a String in the constructor. For example:
Scanner scnr = new Scanner("this\nis some input \non three lines.\n");
In your code sample, each call to nextInt() would get the next token as it is executed. A problem could be if you do not clear the newline character from the buffer by calling the nextLine() method