EDIT: Fixed it myself. Thanks though.
Printable View
EDIT: Fixed it myself. Thanks though.
You get the first number with your first call to nextInt(). Then you get the rest of the numbers in a String by calling nextLine(). Then you try to get the numbers again by calling nextInt() in a loop, but you've already gone past them with your nextLine() call, so there is nothing left to scan.
I don't know what your code is, but wouldn't a for loop probably work.
Please don't remove your posts. Keeping your posts can help future users with future problems.