/
kanisavi
/
Course_hash
Обзор
Документация
Войти
/
kanisavi
/
Course_hash
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Address.java
22 строки
498 B
Карина Басова
create Address.java
03 янв 2026, 15:06
03 янв 2026, 15:06
5f50412
Код
Авторство
О чём код?
import java.util.Objects; public class Address { protected String country; protected String city; public Address(String country, String city) { this.country = country; this.city = city; } @Override public int hashCode() { return Objects.hash(country, city); } @Override public boolean equals(Object obj) { Address a = (Address) obj; return country.equals(a.country) && city.equals(a.city); } }