L
L
Loligan2015-07-13 12:26:12
Java
Loligan, 2015-07-13 12:26:12

Where in practice and under what tasks is the verification of the equivalence of objects used?

In what tasks is it necessary to check the equivalence of equals objects? When it may be needed, preferably on some example.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evhen, 2015-07-13
@Loligan

In most cases, the equals + hashCode method is implemented so that the class object is correctly stored in the Map and Set collections. The internal implementation of collections uses these methods.

A
alk, 2015-07-13
@Alexey_Kutepov

String comparison for example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question