The Artima Developer Community
Sponsored Link

Java Buzz Forum
Java Equals Hashcode Contract Example

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
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
Reply to this message Reply

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

Advertisement
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

Topic: Java Tutorial : Java wrapper class (Character) Previous Topic   Next Topic Topic: Java Tutorial : Java format (DecimalFormat class)

Sponsored Links



Google
  Web Artima.com   

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