Saved Bookmarks
| 1. |
Explain hashCode() and equals() in Java. |
|
Answer» HashMap is part of the Java collection framework. HashMap uses a technique known as hashing. Hashing is the process of CONVERTING an object into an integer value. Indexing and search speed are AIDED by the integer value. It is in charge of CREATING the map interface. It stores the data in a Key/Value PAIR. In HashMap, the node is represented as a class that holds an array of nodes. Internally, it uses an array and LinkedList data structure to hold Key and Value. There are four fields in HashMap.
|
|