public class RandomNumber {
public static void main(String[] args) {
int[] num = new int[10];
//将任意数赋值给数组
for (int i = 0; i < num.length; i++) {
num[i] = (int) (Math.random() * 10);
}
//输出数组中的数
for (int j = 0; j < num.length; j++) {
System.out.println(num[j]);
}
}
}