public static boolean equals(boolean[] field1,boolean[] field2){
  if (field1 == null || field1.length == 0) {
    return field2 == null || field2.length == 0;
  }
 else {
    return Arrays.equals(field1,field2);
  }
}

public static boolean equals ( boolean [ ] field1 , boolean [ ] field2 ) { if ( field1 == null || field1 . length == 0 ) { return field2 == null || field2 . length == 0 ; } else { return Arrays . equals ( field1 , field2 ) ; } }
checks repeated boolean field equality ; null - value and 0 - length fields are considered equal .
