This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Have a look on the API of remove() method of the HashSet and the equals() method of the Integer class.
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Joined: Jun 02, 2010
thanks Abiraman for the pointer!
I added boolean conditions to test whether the elements are actually being removed or not.
And found that i2 here is not being removed!
then is it that i2 can now never be removed? i added new statements for remove and size and still the size is shown as 1.
Please help! I am getting confused..