标签:blog log div turn 工具箱 for arrays logs []
1 int[] x={1,6,4,8,6,9,12,32,76,34,23};
升序:
1 Arrays.sort(x);
降序:
1 resort(x); 2 public int[] resort(int[] num){ 3 Arrays.sort(num); 4 int[] resort=new int[num.length]; 5 for(int j=0;j<num.length;j++){ 6 resort[j]=num[num.length-1-j]; 7 } 8 return resort; 9 }
标签:blog log div turn 工具箱 for arrays logs []
原文地址:http://www.cnblogs.com/dflmg/p/6365590.html