Okay, so I am trying to read in all the integers from the file into an array and then store them into the array called "Balls." The currentSize integer keeps track of the currentSize of the array. Now, I am having trouble placing it. Where would I put this code so that the integers from the file go into the array and then I can use the integers in the array to spawn Balls?
1 2 3 4 5 6 7 | this .Balls = new int [ 10000 ]; while (s.hasNext()) { if (currentSize < Balls.length) { Balls[currentSize++] = s.nextInt(); } |