import java.util.Random;
public class exam1
{
    public static void main (String args[])
    {
    //  Scanner scan = new Scanner(System.in);
        int array [] = new int[10];
        Random rand = new Random(1001);
        int sum = 0;
        int sum1 = 0;
        for(int i=0; i<array.length; i++)
        {
            array[i]=rand;
            sum = sum+array[i];
            sum1=sum/array.length;
        }
            System.out.println(sum);
    }
}
I can't get to generate random numbers at all. How to generate 1000 random numbers from size 10 array and find the average of the numbers and print them on the screen?
 
     
    