package cn.ljs; import java.util.Arrays; public class ArrayDemo { public static void main(String [] args){ int [] arr1 = {,,};
int [] arr2 = {,,,,};
System.out.println(Arrays.equals(arr1,arr2)); // 简单说比较两数组形状相同不 System.out.println(Arrays.toString(arr1)); // toString Arrays.sort(arr2);
System.out.println(Arrays.toString(arr2)); Arrays.fill(arr1,-); // 填充-1
System.out.println(Arrays.toString(arr1)); int index = Arrays.binarySearch(arr2,); // 排序
System.out.println(index); int [] b = Arrays.copyOf(arr1, arr1.length); //copy 数组
System.out.println(arr1 == b);
}
}