场景:做excel导入的时候,需要校验表头,表头必须是固定的字段值,且字段的顺序必须一致;
方法:Arrays.equals(Object[] a, Object[] b)
String a[]={"姓名","性别","地址"};
String[] b={"姓名","性别","地址"};
System.out.println(Arrays.equals(a, b));
场景:做excel导入的时候,需要校验表头,表头必须是固定的字段值,且字段的顺序必须一致;
方法:Arrays.equals(Object[] a, Object[] b)
String a[]={"姓名","性别","地址"};
String[] b={"姓名","性别","地址"};
System.out.println(Arrays.equals(a, b));