Published: Dec 28 2012 / 10:18
"3. Have you overridden equals and hashcode methods?"
In Java it's almost never appropriate to implement equals() and hashCode(). Quite the contrary, it's dangerous! The only exception are value types like Date, BigDecimal etc..
Thanks MCII for the feedback.I do agree with you on this. I have re-framed the content. Sorry for the confusion. Thanks, Ekram Ali Kazi
Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.
Advertising - Terms of Service - Privacy - © 1997-2014, DZone, Inc.