public static boolean equals(final Object[] a,final Object[] b){
  if (a == b) {
    return true;
  }
 else   if (a.length != b.length) {
    return false;
  }
  for (int i=0; i < a.length; i++) {
    final Object x=a[i];
    final Object y=b[i];
    if (x == null) {
      if (y != null) {
        return false;
      }
    }
 else {
      if (!x.equals(y)) {
        return false;
      }
    }
  }
  return true;
}

public static boolean equals ( final Object [ ] a , final Object [ ] b ) { if ( a == b ) { return true ; } else if ( a . length != b . length ) { return false ; } for ( int i = 0 ; i < a . length ; i ++ ) { final Object x = a [ i ] ; final Object y = b [ i ] ; if ( x == null ) { if ( y != null ) { return false ; } } else { if ( ! x . equals ( y ) ) { return false ; } } } return true ; }
check two lists of objects for equality .
