Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Data Structure Interview Questions
→
Basic Data Structure Interview Questions for Freshers in Data Structure Interview Questions
→
What is the requirement for an object to be used a...
1.
What is the requirement for an object to be used as key or value in HashMap?
Answer»
The key or value object that gets used in the hashmap must implement equals() and hashcode() method.
The hash code is used when inserting the key object into the map and the equals method is used when trying to retrieve a value from the map.
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
What is the time complexity of basic operations get() and put() in HashMap class?
How does HashMap handle collisions in Java?
What is the requirement for an object to be used as key or value in HashMap?
What is hashmap in data structure?
What is an asymptotic analysis of an algorithm?
Difference between Array and Linked List.
Elaborate on different types of Linked List data structures?
What is a linked list data structure? What are the applications for the Linked list?
Elaborate on different types of array data structure
What is array data structure? What are the applications of arrays?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies