/
hel_bumer
/
HashMap
Обзор
Документация
Войти
/
hel_bumer
/
HashMap
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Address.java
23 строки
587 B
hel_bumer
HashMap
16 фев 2026, 13:45
Верифицирован
16 фев 2026, 13:45
6f60847
Код
Авторство
О чём код?
import java.util.Objects; public class Address { 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 address)) return false; return Objects.equals(country, address.country) && Objects.equals(city, address.city); } @Override public int hashCode() { return Objects.hash(country, city); } protected String country; protected String city; }