Comparing objects never returns true

后端 未结 4 1876
死守一世寂寞
死守一世寂寞 2021-01-25 20:35

I\'m trying to compare two objects of the same type (in method doesHave), but I\'ve never got \"true\" returned. Here\'s my code:

private ArrayList          


        
4条回答
  •  孤城傲影
    2021-01-25 21:17

    Responds from @libik and @Code Whisperer helped me, so if anyone has the same problem, read and try to understand, it helped for me. I like that twins allegory :) It's kind of the same situation when I tried to compare two Strings.

提交回复
热议问题