Linux教程網
JAVA數組的排序
- import java.util.Arrays;
- /**
- * 數組的排序
- * @author HAN
- *
- */
- public class ArraySortApps {
-
- public static void main(String[] args) {
- int arr1[]=new int[]{2,3,1,6,7};
- Arrays.sort(arr1);
- System.out.println(arr1[0]);
-
- }
-
- }
Copyright ©
Linux教程網 All Rights Reserved