package com.cyf0716;
import java.util.Arrays;
import java.util.Random;
public class RandomTest {
public static void main(String[] args) {
int[] a = new int[10];
for (int i = 0; i < a.length; i++) {
a[i] = (int) (Math.random() * 100);
}
for (int i = 0; i < a.length; i++) {
Arrays.sort(a);
System.out.print(a[i]+" ");
}
}
}
添加回答
举报
0/150
提交
取消