/
2007chester
/
HASH
Обзор
Документация
Войти
/
2007chester
/
HASH
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Address.java
28 строк
698 B
2007chester
upload files
04 мар 2025, 17:51
04 мар 2025, 17:51
9a59b4e
Код
Авторство
О чём код?
import java.util.*; class Address { private final String country; private final String city; public Address(String country, String city) { this.country = country; this.city = city; } public String getCountry() { return country; } @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); } }