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]+" "); } } }
KXFT
甫艾蒽廷
相关分类