Java Array Equal areEqualArrays(Object[] a1, Object[] a2)

Here you can find the source of areEqualArrays(Object[] a1, Object[] a2)

Description

are Equal Arrays

License

Open Source License

Return

whether the two given arrays are the same (including null) or equal according to .

Declaration

public static boolean areEqualArrays(Object[] a1, Object[] a2) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2007 Bruno Medeiros and other Contributors.
 * 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:/* w  w w  . j av a2s.co m*/
 *     Bruno Medeiros - initial implementation
 *******************************************************************************/

import java.util.Arrays;

public class Main {
    /** @return whether the two given arrays are the same (including null) or equal 
     * according to {@link Arrays#equals(Object[], Object[])}. */
    public static boolean areEqualArrays(Object[] a1, Object[] a2) {
        return Arrays.equals(a1, a2);
    }
}

Related

  1. allEqual(int[] values)
  2. allEquals(double[][] sims)
  3. allEquals(final String value, final String... strings)
  4. allEquals(int needle, byte... bytes)
  5. allEquals(int y, int y2, int y3)
  6. arrayEq(byte[] a, byte[] b)
  7. arrayEqual(char[] a, char[] b, int aStart, int bStart, int length)
  8. arrayEquals(byte[] data, byte[] expected)
  9. arrayEquals(byte[] left, byte[] right)