Here you can find the source of hashCode(Object[] array)
public static int hashCode(Object[] array)
//package com.java2s; /******************************************************************************* * Copyright (c) 2000, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from ww w. j a v a2s.com*/ * IBM Corporation - initial API and implementation * daolaf@gmail.com - Contribution for bug 3292227 *******************************************************************************/ public class Main { public static int hashCode(Object[] array) { int prime = 31; if (array == null) { return 0; } int result = 1; for (int index = 0; index < array.length; index++) { result = prime * result + (array[index] == null ? 0 : array[index].hashCode()); } return result; } }