Why Override equals, hashcode and toString method in Java

Why Override equals, hashcode and toString method in Java

瀏覽:1476
日期:2024-04-29
Couple of questions, which are often asked to me was why do we need to override equals() and hashcode() method, Why should I implement toString(), What will happen if I don't override them or in a different way, I have never overridden equals and hashcode...看更多