Java shuffle program
<p>I have to write this program in java.</p>

<p>Write a program name sorting.java that will use an array to store 10,000 randomly generated 
numbers (ranging from 1 to 10,000 no repeat number).</p>

<p>I realize this is similar to a question I asked recently but I am wondering if anyone can check my program and see if I made any mistakes.</p>

<pre><code>public class Sort
{
    public static void main(String[] args)
    {


        Random rgen = new Random();  // Random number generator
        int[] nums = new int[10,000];  //array to store 10000 random integers (1-10,000)

        //--- Initialize the array to the ints 1-10,000
        for (int i=0; i&lt;nums.length; i++) {
            nums[i] = i;
        }

        //--- Shuffle by exchanging each element randomly
        for (int i=0; i&lt;nums.length; i++) {
            int randomPosition = rgen.nextInt(nums.length);
            int temp = nums[i];
            nums[i] = nums[randomPosition];
            nums[randomPosition] = temp;
        }

        //Print results
        for (int i = 0; i &lt; nums.length; i++){
        System.out.println(nums[i]);
        System.out.println("\n");
    }
}
</code></pre>
