What will happen if you don't override hashcode method | java interview questions

preview_player
Показать описание
Thanks for watching this video hope you liked the video and cleared your understanding.

Java interview questions
How hashmap works ?
what is hashcode method ?
what is the equals method ?
what is need to override equals method ?
what is need to override hashcode method ?
how is hashmap implemented ?
what will happen if you do not overide equals method ?
what will happen if you do not overide hashcode method ?
what will happen if equals method always return true ?
what will happend if hashcode method only return specific value ?
what is the contract between hashcode and equals method ?
what is new implementation of hashmap in java 8 ?
Рекомендации по теме
Комментарии
Автор

I understood some points that if we don't override hashCode() then an ambiguity arises because of which the Key's hash values won't be considered and hence all the 4 values was added into the HashMap even though the keys was duplicated.

YashSingh-xsyj
Автор

Boss ..speak in will be cleard in a much better way

vikramrajawat
visit shbcf.ru