public class TwoArray {
public static void main(String arges[]){
int []a3={2,6,8,7};
int []a1={1,4,3,6,8,12};
int []a2=new int [6];
//数组拷贝
System.arraycopy(a1,2,a2,3,3);
for(int j:a2)
System.out.print(j+"");
//比较两个数组是否相等 执行结果000368
System.out.print (a1.equals(a3));
//数组排序 执行结果false
Arrays.sort(a1,0,a1.length);
for (int i=0;i<a1.length;i++)
System.out.print(a1[i]+"");
//输出6在数组中的下标 执行结果1 3 4 6 8 12
int b= Arrays.binarySeard(a1,b);
System.out.print(b);
}
}
public static void main(String arges[]){
int []a3={2,6,8,7};
int []a1={1,4,3,6,8,12};
int []a2=new int [6];
//数组拷贝
System.arraycopy(a1,2,a2,3,3);
for(int j:a2)
System.out.print(j+"");
//比较两个数组是否相等 执行结果000368
System.out.print (a1.equals(a3));
//数组排序 执行结果false
Arrays.sort(a1,0,a1.length);
for (int i=0;i<a1.length;i++)
System.out.print(a1[i]+"");
//输出6在数组中的下标 执行结果1 3 4 6 8 12
int b= Arrays.binarySeard(a1,b);
System.out.print(b);
}
}