Here you can find the source of arrayEquals(String[] array1, String[] array2)
private static boolean arrayEquals(String[] array1, String[] array2)
//package com.java2s; //License from project: Open Source License public class Main { private static boolean arrayEquals(String[] array1, String[] array2) { if (array1.length != array2.length) { System.err.println("Not equal lengths: " + array1.length + "/" + array2.length); return false; }/*from w w w. j av a2 s .c o m*/ for (int i = 0; i < array1.length; i++) { if (!(array1[i].equals(array2[i]))) { System.err.println("Not equal: " + array1 + "/" + array2); return false; } } return true; } }