首页 > 代码库 > Arrays的案例

Arrays的案例

package ditu.com;
import java.util.Arrays;
import java.util.List;
public class TestArrays {
    public static void main(String[] args) {
    List<String>list=Arrays.asList("james","so","baby","cina");
    int[]score={54,85,23,14,98,52,25};
    Arrays.sort(score);
    int index=Arrays.binarySearch(score,98);
    System.out.println(index);
    }
}

 

Arrays的案例