Basically, yeah, what de Jong is saying is pretty valid. And even if you can't use an ArrayList for the end result,
you should be able to use one temporarily and just convert it to an array at the end of the program. In the real world, you would generally just use an ArrayList and keep it, but depending on what your teacher wants you to do, you might have to waste time like that. Either way, by using an ArrayList, you can just read through the file one time and go ahead and add the numbers to the ArrayList during each step of your for loop. There's actually a method ArrayLists have called toArray().
Another thing you might do is call Array.sort() to get everything in ascending order, as opposed to using an explicit, double-nested for loop.