Which data structure that implements a Map interface uses an == operator, rather than the equals method for objects comparison?
Explanation
IdentityHashMap class is added in SDK 1.4. Keys hash codes are calculated not by using a hashCode method, but by using a System.identityHashCode method. This method is used to calculate a hash code at the object address in memory in Object.hashCode. Additionally, for objects comparison an IdentityHashCode class uses the == operator, instead of the equals method.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Java
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести