#Arrays工具类
1.equals() 比较两个数组的元素是否完全一致,返回的是true/false
2.Sort() 升序排序
3.toString 将一个数组转换成字符串类型,并用【】保护起来。
4.fill() 将数组中所有的元素用一个新的数值全部替换。
5.copyOf() 复制一份
6.binarySearch() 找元素对应的下标,前提是数组已经升序排列好
public static void main(String[] args) {
int a1[] = {1,2,3,4,5};
int a2[] = {1,2,3,4,5,6};
int a3[] = a1;
int a4[] = null;
int a5[] = null;
System.out.println(Arrays.equals(a1,a2));//false
System.out.println(Arrays.equals(a4,a5));//true
System.out.println(null==null);
int [] a6 = {3,5,1,0,9,45};
Arrays.sort(a6);
System.out.println(Arrays.toString(a6));//[0,1,3,5,9,45]
System.out.println(a6);
System.out.println(a6.toString());
//fill
int [] a7 = {3,5,1,0,9,45};
Arrays.fill(a7,6);
System.out.println(Arrays.toString(a7));//[6,6,6,6,6,6]
}