Here you can find the source of intArraysAreEqual(int array1[], int array2[])
public static boolean intArraysAreEqual(int array1[], int array2[])
//package com.java2s; // it under the terms of the GNU General Public License as published by public class Main { /**/*from w ww .ja va 2s . c om*/ * Test if two int arrays are equal. */ public static boolean intArraysAreEqual(int array1[], int array2[]) { int i, n; if (array1 == null) return (array2 == null); n = array1.length; if (n != array2.length) return false; for (i = 0; i < n; i++) { if (array1[i] != array2[i]) return false; } return true; } }