import java.util.Random;
public class Demo {
public static void main (String args[]) {
//定义一个数组存放随机数:
int[] randoms = new int[10];
//产生10个随机数:
Random rnd = new Random();
for (int i=0; i
//正序输出:
System.out.println("正序输出:");
for (int i=0; i
//逆序输出:
System.out.println("逆序输出:");
for (int i=randoms.length-1; i>=0; i--)
System.out.println(randoms[i]);
}
}