public static void randomNumber(int[] num,int n){
  for (int j=0; j < n; j++) {
    num[j]=(int)(Math.random() * 10);
  }
}

public static void randomNumber ( int [ ] num , int n ) { for ( int j = 0 ; j < n ; j ++ ) { num [ j ] = ( int ) ( Math . random ( ) * 10 ) ; } }
generate random number of size n directly into num
