View Single Post
  #3 (permalink)  
Old 08-03-2007, 02:34 PM
haridharna haridharna is offline
Member
 
Join Date: Aug 2007
Posts: 3
haridharna is on a distinguished road
Brainhks thanks for the reply.
But I still have some doubts.
1)-- In the above code, equals method is called sometimes and sometimes it is not called. Can you or any one tell the reason for that.
2)-- When I set K2.i =1 the equals method is called and when I set k2.i=2 or with some other number the equals method is not called.
3)-- When i call the contains method after removing k2 both set.contains(k2) and set.contains(k1) are returning false. why is it so even when there is a value in the hashset.
4)-- Is the result same for the Hashtable and HashSet both same.
Reply With Quote