Why don't hashCode() and equals() work when a List implemented object stores its own object as a element?
A List bases its equals relation on the contents of the list. If one of the members is the list itself, infinite recursion ensues. The same problem occurs with hashCode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With