/
kai_mai
/
HashSetHashMapTask
Обзор
Документация
Войти
/
kai_mai
/
HashSetHashMapTask
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Address.java
26 строк
610 B
Катя Майборода
upload files
30 ноя 2025, 22:07
30 ноя 2025, 22:07
64dab3a
Код
Авторство
О чём код?
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 instanceof Address)) { return false; } Address address = (Address) o; return country.equals(address.country) && city.equals(address.city); } @Override public int hashCode() { return country.hashCode() * 31 + city.hashCode(); } }