Here you can find the source of arrayHashCode(Object[] arr)
public static int arrayHashCode(Object[] arr)
//package com.java2s; //License from project: Apache License public class Main { public static int arrayHashCode(Object[] arr) { int hash = 0; if (arr != null) { // Avoid that 2 arrays of length 0 but different classes return same // hash hash ^= arr.getClass().hashCode(); for (int i = 0; i < arr.length; ++i) { hash ^= arr[i] == null ? 0 : arr[i].hashCode(); }//from w ww . j av a 2s. c om } return hash; } public static int arrayHashCode(byte[] arr) { int hash = 0; if (arr != null) { // Avoid that 2 arrays of length 0 but different classes return same // hash hash ^= arr.getClass().hashCode(); for (int i = 0; i < arr.length; ++i) { hash ^= arr[i]; } } return hash; } }