Java Array Equal arraysEqual(byte array1[], byte array2[])

Here you can find the source of arraysEqual(byte array1[], byte array2[])

Description

arrays Equal

License

LGPL

Declaration

public static boolean arraysEqual(byte array1[], byte array2[]) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static boolean arraysEqual(byte array1[], byte array2[]) {
        if (array1.length != array2.length) {
            return false;
        }/*ww w. jav  a 2s .  co  m*/
        for (int i = 0; i < array1.length; ++i) {
            if (array1[i] != array2[i]) {
                return false;
            }
        }
        return true;
    }
}

Related

  1. arrayEqualsSubset(final byte[] array, final int... elements)
  2. arraysAreEqual(double[] a1, double[] a2)
  3. arraysAreEqual(final byte[] array1, final byte[] array2)
  4. arraysAreEqual(Object value, Object otherValue)
  5. arraysEqual(boolean[] a, boolean[] b)
  6. arraysEqual(byte[] bytes, byte[] ints)
  7. arraysEqual(final Object[] a1, final Object[] a2)
  8. arraysEqual(Object[] array1, Object[] array2)
  9. arraysEqual(String[] arr1, String[] arr2)