I have two object arrays like so:
Object[] array1 = {0, 1, 2, 3};
Object[] array2 = {0, 1, 2, 3};
I would like to know if the arrays are eq
java.util.Arrays.equals
/**
* Returns true if the two specified arrays of Objects are
* equal to one another. The two arrays are considered equal if
* both arrays contain the same number of elements, and all corresponding
* pairs of elements in the two arrays are equal. Two objects e1
* and e2 are considered equal if (e1==null ? e2==null
* : e1.equals(e2)). In other words, the two arrays are equal if
* they contain the same elements in the same order. Also, two array
* references are considered equal if both are null.
*
* @param a one array to be tested for equality.
* @param a2 the other array to be tested for equality.
* @return true if the two arrays are equal.
*/
public static boolean equals(Object[] a, Object[] a2)