Java Array Equal equals(byte[] a1, byte[] a2)

Here you can find the source of equals(byte[] a1, byte[] a2)

Description

equals

License

Open Source License

Declaration

public static boolean equals(byte[] a1, byte[] a2) 

Method Source Code

//package com.java2s;
//  in accordance with the terms of the license agreement accompanying it.

import java.util.Arrays;

public class Main {
    public static boolean equals(Object[] a1, Object[] a2) {
        return Arrays.equals(a1, a2);
    }/*from  w  ww  .  j a  v  a2s  .  c om*/

    public static boolean equals(byte[] a1, byte[] a2) {
        return Arrays.equals(a1, a2);
    }

    public static boolean equals(long[] a1, long[] a2) {
        return Arrays.equals(a1, a2);
    }

    public static boolean equals(int[] a1, int[] a2) {
        return Arrays.equals(a1, a2);
    }

    public static boolean equals(double[] a1, double[] a2) {
        return Arrays.equals(a1, a2);
    }

    public static boolean equals(char[] a1, char[] a2) {
        return Arrays.equals(a1, a2);
    }

    public static boolean equals(short[] a1, short a2[]) {
        return Arrays.equals(a1, a2);
    }
}

Related

  1. equalIgnoreOrder(final Object[] array1, final Object[] array2)
  2. equalityCheck(byte[] a, byte[] b)
  3. equalMaps(Map expected, Map actual)
  4. equalOrDie(String testName, Object[] a, Object[] b)
  5. equals(byte[] a, byte[] b)
  6. equals(byte[] data1, byte[] data2)
  7. equals(byte[] first, byte[] second)
  8. equals(byte[] first, byte[] second)
  9. equals(char[] left, int offsetLeft, char[] right, int offsetRight, int length)