Random Lottery Number help?
<pre><code>import java.util.Random;
import java.util.Scanner;

class Lottery {

    private int lotteryNumbers[];


    public int [] lotteryPicks() {

        lotteryNumbers = new int[499];
        for (int i = 0; i &lt; lotteryNumbers.length; i++) {
            lotteryNumbers[i] = (int) (Math.random() * 55) + 1;
        }
     return lotteryNumbers;
}
</code></pre>

<p>This program (not all methods shown) takes the users input of 6 numbers ( 5 numbers and 1 megaball) and compares them with 6 random numbers generated by the computer to see how likely someone is to win the lottery. My problem is with the lotteryPicks() method. Here's the issue I don't know how to create 6 random numbers n amount of times( say 500 )? So ideally it would generate 6 numbers say 12,14,45,32,25,17 and the next time generate 6 new numbers until there's 500 sets of numbers. Also, can you return in a for-loop? Any help would be appreciated!</p>
