/
BorisovaValentina
/
Hash
Обзор
Документация
Войти
/
BorisovaValentina
/
Hash
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Address.java
26 строк
652 B
BorisovaValentina
«Коллекция HashMap и HashSet»
15 авг 2025, 23:51
15 авг 2025, 23:51
270c63d
Код
Авторство
О чём код?
package Delivery; import java.util.Objects; public class Address { private String country; private String city; public Address(String country, String city) { this.country = country; this.city = city; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Address address = (Address) o; return Objects.equals(country, address.country) && Objects.equals(city, address.city); } @Override public int hashCode() { return Objects.hash(country, city); } }