-2
是否可以对以下代码对随机生成的整数数组进行排序(升序)?如果,那么如何?随机数组排序
import java.util.Random;
公共类RandomArraySorter {
public static void main(String args[]){
Random random = new Random();
int array[] = new int[10];
//number of integer spaces within the array:
for(int i = 0; i < 10; i++){
//random numbers from 1 to 100:
array[i] = random.nextInt(100) + 1;
System.out.print(array[i] + " ");
}
} //end of main
} //end of class