This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
So, you need an array of random, but unique integers?
One way you could do this is by making a loop for all the elements of the array, and in each iteration generate a random number, check if it is already in the array, and if it is not, then put it in the array and go to the next iteration; otherwise, generate another random number (until you get one that's not already in the array). This approach has a major disadvantage: in principle it could run forever, or it could take a long time before the random number generator creates a number that's not already in the array. It will probably work OK if the size of the array is small compared to the range of random integers that you're choosing from.
Another way is to fill a list with numbers (just 1, 2, 3, ..., etc.) and then shuffle the list using Collections.shuffle();.
I would include a comment that this is the shuffling algorithm as used by Collections.sort. It is available from the src.zip file that comes with the JDK installatation, and it informs your professor that you know to look for methods in the API first. After all, you need to understand your own solution. If you don't get the shuffling then use your old code (but with ArrayList).