The Artima Developer Community
Sponsored Link

Java Buzz Forum
How get method of HashMap or Hashtable works internally in Java

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 1090
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
How get method of HashMap or Hashtable works internally in Java Posted: Jun 2, 2013 8:18 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: How get method of HashMap or Hashtable works internally in Java
Feed Title: Java67
Feed URL: http://www.java67.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement
In this article, I am revisiting couple of interesting question related to internal working of HashMap in Java, mostly asked to senior Java developers, ranging from 4 to 6 and upto 8 years of experience. I did cover lot of these questions from HashMap, ranging from thread-safety to race conditions, in my post about internal working of Java HashMap, but I thought to revisit two of those questions, How get method of HashMap or Hashtable works internally in Java and What happens if two different keys return same hashCode, how do you return value form HashMap in that case. These are the question, which is highly popular in investment banking domain, and preferred choice of interviewer, while interviewing experienced Java professional. If these questions are still being asked, it means not many are answering them in the clarity and confidence they are looking for. This motivates me to revisit these questions again. On a side note, in order to understand these questions, you should have good knowledge of equals and hashcode method as well. At least you should know that :

1) Two unequal object may return same hashcode.
2) When two objects are equal by equals(), they must have same hashcode.
Read more ยป

Read: How get method of HashMap or Hashtable works internally in Java

Topic: Design Guidelines 1.1 โ€“ Making Your Life Easier Previous Topic   Next Topic Topic: The Dev-QA Delicate Relationship

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use