Java Array Equal equals(int[] a, int[] b)

Here you can find the source of equals(int[] a, int[] b)

Description

Use java.util.Arrays instead.

License

Open Source License

Declaration

public static boolean equals(int[] a, int[] b) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*www  . j a  va2s.  co m*/
     * Use java.util.Arrays instead.
     * Check if two arrays are equal.
     *
     * @deprecated Use java.util.Arrays instead.
     */
    public static boolean equals(int[] a, int[] b) {
        if (a.length != b.length) {
            return (false);
        }
        for (int i = 0; i < a.length; i++) {
            if (a[i] != b[i]) {
                return (false);
            }
        }
        return (true);
    }
}

Related

  1. equals(Collection asCollection, String[] values)
  2. equals(double[][] xs, double[][] ys)
  3. equals(final byte[] a, final byte[] b)
  4. equals(final byte[] array1, final byte[] array2)
  5. equals(final T[][] a, final T[][] b)
  6. equals(int[][] ar1, int[][] ar2)
  7. equals(long[] a, long[] a2)
  8. equals(Map a, Map b)
  9. equals(Map map1, Map map2)