Welcome 微信登录

首页 / 操作系统 / Linux / JAVA数组的排序

JAVA数组的排序
  1. import java.util.Arrays;  
  2. /** 
  3.  * 数组的排序 
  4.  * @author HAN 
  5.  * 
  6.  */  
  7. public class ArraySortApps {  
  8.   
  9.     public static void main(String[] args) {  
  10.         int arr1[]=new int[]{2,3,1,6,7};  
  11.         Arrays.sort(arr1);  
  12.         System.out.println(arr1[0]);  
  13.   
  14.     }  
  15.   
  16. }