InterviewSolution
Saved Bookmarks
| 1. |
Differentiate between HashSet and HashMap. |
||||||||||||||
|
Answer» HashSet is a Set Interface implementation that does not allow duplicate values. The essential point is that objects STORED in HashSet must override equals() and HASHCODE() methods to ensure that no duplicate values are stored in our set. HASHMAP is a Map Interface implementation that maps a key to a value. In a map, duplicate keys are not permitted.
|
|||||||||||||||