/
Shcod
/
java-hw-HashMap_HashSet
Обзор
Документация
Войти
/
Shcod
/
java-hw-HashMap_HashSet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/main/java/Address.java
31 строка
695 B
Shcod
first commit
05 авг 2026, 08:08
05 авг 2026, 08:08
f39ce00
Код
Авторство
О чём код?
import java.util.Objects; public class Address { private String country; private String city; public Address(String country, String city) { this.country = country; this.city = city; } public String getCountry() { return country; } public String getCity() { return city; } @Override public boolean equals(Object o) { 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); } }