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