/
AleksejRo
/
9t.
Обзор
Документация
Войти
/
AleksejRo
/
9t.
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Address.java
26 строк
508 B
AleksejRo
upload files
08 авг 2025, 00:41
08 авг 2025, 00:41
3633130
Код
Авторство
О чём код?
import java.util.Objects; public class Address { protected String city; protected String country; public Address(String country, String city) { this.country = country; this.city = city; } @Override public int hashCode() { return Objects.hash(city, country); } @Override public boolean equals(Object obj) { Address o = (Address) obj; return country.equals(o.country) && city.equals(o.city); } }