package com.itcast;
import java.util.*;
import static java.util.Arrays.*;
public class StaticImport {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int[]arr={3,2,4};
sort(arr);
System.out.println(Arrays.toString(arr));为何此处的Arrays省去后报错?不是已经将Arrys中的的静态方法已经导入了吗??????????????
int index=Arrays.binarySearch(arr,3);
System.out.println(index);
}
}
|
|