Prem wrote:No, it doesn't work that way, and it won't be helpful. Just doing your work for you doesn't help you. The idea is to give you the tools to solve your own problem--to nudge you just enough to get you over the hump. You still have to do the hard work, and the boring, tedious work as well.jtahlborn wrote:Could you please elaborate more by editing my code.... It will be very helpful.
equality for a HashSet is controlled via the hashCode() and equals() methods on the objects you add to it. make sure yours are implemented appropriately.