default equals method java code example Example: How to compare lists of custom classes without defining equals() and hashCode()? lists equal