Here you can find the source of isEquals(List extends Object> l1, List extends Object> l2)
public static boolean isEquals(List<? extends Object> l1, List<? extends Object> l2)
//package com.java2s; import java.util.Iterator; import java.util.List; public class Main { public static boolean isEquals(List<? extends Object> l1, List<? extends Object> l2) { if (l1 == l2) return true; if (l1 == null) return l2 == null; if (l2 == null) return false; if (l1.size() != l2.size()) return false; Iterator<? extends Object> iter1 = l1.iterator(); Iterator<? extends Object> iter2 = l2.iterator(); while (iter1.hasNext()) { Object o1 = iter1.next(); Object o2 = iter2.next(); if (o1 == o2) continue; if (o1 == null && o2 != null) return false; if (!o1.equals(o2)) return false; }/*from w w w . j av a 2 s . c om*/ return true; } }