Search Interview Questions
| 3167 questions in repository.|
There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Interview Questions and Answers for 'Dainik Navajyoti' - 1 question(s) found - Order By Newest|
|Frequently asked in all types of companies especially Indian Services companies. Frequently asked in CTS (Based on 2 feedback)|
|Ans. Hashcode is used for bucketing in Hash implementations like HashMap, HashTable, HashSet etc. The value received from hashcode() is used as bucket number for storing elements. This bucket number is the address of the element inside the set/map. when you do contains() then it will take the hashcode of the element, then look for the bucket where hashcode points to and if more than 1 element is found in the same bucket (multiple objects can have the same hashcode) then it uses the equals() method to evaluate if object are equal, and then decide if contain() is true or false, or decide if element could be added in the set or not.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve java collections hashcode advanced hashtable Cognizant (CTS) Compro Technologies VigLink Proofpoint Accolite Foot Locker IMC Trading LG Mobile Phones Probity Soft EPPS Infotech AbeBooks LiquidNet Google Girmiti Software Hashcode IT Solutions Aurionpro Solutions Insonix Genpact Trentor CatalystOne Solutions RedBlink Bayatree Infocom Security Weaver Steg Technologies Roshi Software Solutions DreamSoft4u Decipher Zone Softwares Precise Automation & Robotics Componence Dainik Navajyoti Bodacious IT Hub Naggaro intermediate   frequent|
Try 1 Question(s) Test
|Which String class does not override the equals() and hashCode() methods, inheriting them directly from class Object?|
|Write a class and override the equals and hashcode method ?|