Here you can find the source of isEquals(Object firstArray, Object secondArray)
public static boolean isEquals(Object firstArray, Object secondArray)
//package com.java2s; //License from project: Apache License import java.util.Arrays; public class Main { public static boolean isEquals(Object firstArray, Object secondArray) { if (firstArray.getClass() != secondArray.getClass()) { return false; }/*w w w . j a v a 2 s .c o m*/ Class arrayClass = firstArray.getClass(); if (boolean[].class.equals(arrayClass)) { return Arrays.equals((boolean[]) firstArray, (boolean[]) secondArray); } else if (byte[].class.equals(arrayClass)) { return Arrays.equals((byte[]) firstArray, (byte[]) secondArray); } else if (short[].class.equals(arrayClass)) { return Arrays.equals((short[]) firstArray, (short[]) secondArray); } else if (int[].class.equals(arrayClass)) { return Arrays.equals((int[]) firstArray, (int[]) secondArray); } else if (long[].class.equals(arrayClass)) { return Arrays.equals((long[]) firstArray, (long[]) secondArray); } else if (float[].class.equals(arrayClass)) { return Arrays.equals((float[]) firstArray, (float[]) secondArray); } else if (double[].class.equals(arrayClass)) { return Arrays.equals((double[]) firstArray, (double[]) secondArray); } else if (char[].class.equals(arrayClass)) { return Arrays.equals((char[]) firstArray, (char[]) secondArray); } else { return Arrays.equals((Object[]) firstArray, (Object[]) secondArray); } } }