Here you can find the source of arrayContentsEq(Object[] a1, Object[] a2)
private static boolean arrayContentsEq(Object[] a1, Object[] a2)
//package com.java2s; //License from project: Apache License public class Main { private static boolean arrayContentsEq(Object[] a1, Object[] a2) { if (a1 == null) { return a2 == null || a2.length == 0; }/*from w w w . j a v a 2 s .c o m*/ if (a2 == null) { return a1.length == 0; } if (a1.length != a2.length) { return false; } for (int i = 0; i < a1.length; i++) { if (a1[i] != a2[i]) { return false; } } return true; } }