public class SelectSort {
public static void main(String[] args){
int[] arr={3,1,15,29,16,9,66,84,42,36,99};
System.out.print("给定一个无序的数组:");
for(int i:arr){
System.out.print(i+" ");
}
System.out.println("n");
SelectSort select=new SelectSort();
select.selectSort(arr);
System.out.print("选择排序后的数组:");
for(int i:arr){
System.out.print(i+" ");
}
}
private int[] selectSort(int[] arr){
for(int i=0;i
给定一个无序的数组:3 1 15 29 16 9 66 84 42 36 99
选择排序后的数组:1 3 9 15 16 29 36 42 66 84 99



