Java Guru
Posts: 70
Nickname: skumjava
Registered: Feb, 2016
|
Java Guru has 6+ years exp in Java Programming, He is writer at http://singletonjava.blogspot.com
|
|
|
|
Java Equals Hashcode Contract Example
|
Posted: Feb 23, 2016 7:50 PM
|
|
|
This post originated from an RSS feed registered with Java Buzz
by Java Guru.
|
Original Post: Java Equals Hashcode Contract Example
Feed Title: Java Interview Questions and Answers with Example
Feed URL: http://singletonjava.blogspot.com/feeds/posts/default?alt=rss
Feed Description: Blog for Java techniques and Programming Tutorials, Examples, Design Patterns, Interview Questions and Answers, Cloud, Virtualization, XML, Docker, Multithreading, Collection, Error and Exception, Java Singleton Design Pattern, Docker Interview Questions, String, Executor Service, Array List, TreeSet, HashMap, Concurrency
|
Latest Java Buzz Posts
Latest Java Buzz Posts by Java Guru
Latest Posts From Java Interview Questions and Answers with Example
|
|
This the one of the most common question we used to face during Core Java interview, however its understanding is bit tricky. I will rather take unique approach to make the understanding simple.
So, what is the contract between hashcode and equals to be used as a key to HashMap / HashSet?
Java specification says that if you want to use any object as key to a hashmap or hashset or any other
Read: Java Equals Hashcode Contract Example
|
|