This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am using this object in Arraylist and sorting the list based on this. Then i am adding the list of this objects(List<ClassA> to HashSet, Then i am populating another List<ClassA> if it is not there in hashset.
The question here is should i have to implement equals and hashcode methods in ClassA. If so caan anyone give an efficient equal and hashcode impl code.