最基本的方法:
import java.util.Random;
public class RandomArray{
public static void main(String[] args){
int n = 100;
Random random = new Random();
Integer[] data = new Integer[n];
for(int i = 0;i < n ;i++){
data[i]= random.nextInt(10000);
}
}
}