Here you can find the source of Equals(Object in1, Object in2)
public static final boolean Equals(Object in1, Object in2)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static final boolean Equals(Object in1, Object in2) { if (in1 instanceof int[]) return Arrays.equals((int[]) in1, (int[]) in2); else {//from w ww. ja va 2 s . c o m if (((Object[]) in1).length != ((Object[]) in2).length) return false; for (int i = 0, s = ((Object[]) in1).length; i < s; i++) if (!Equals(((Object[]) in1)[i], ((Object[]) in2)[i])) return false; return true; } } }