The definition of equality depends on the container. Usually it's the .equals()/.hashCode() relationship, but there are some containers that use identity for equality. | 0 |
By: [email protected] On: Mon Aug 12 11:06:25 EDT 2013 0 153 0 | 153 |
Are You Satisfied :1Yes1No |
Hi Umesh, Thanks for your information, plz give me one sample example code.I am really confused on this topic. | 0 |
By: [email protected] On: Mon Aug 12 11:33:05 EDT 2013 4 3 0 | 7 |
Are You Satisfied :0Yes0No |
HashMap does not permit duplicate keys. If you have two values with the same associated key, it retains which ever was "put" more recently, and loses the older value. and You cannot have a HashMap<Integer>; it needs two types. It has no add() method. | -2 |
By: [email protected] On: Tue Aug 13 02:18:50 EDT 2013 0 392 0 | 392 |
Are You Satisfied :0Yes1No |
Hi Ravimalik, I am not asking Map interface(HashMap) , My question is how to add duplicate values in Set interface , for example (TreeSet)... +Regards, Vasanth | 0 |
By: [email protected] On: Tue Aug 13 07:51:51 EDT 2013 4 3 0 | 7 |
Are You Satisfied :0Yes0No |