/
RazmikAr
/
Homework13
Обзор
Документация
Войти
/
RazmikAr
/
Homework13
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Adress.java
25 строк
653 B
RazmikAr
Homework13
01 фев 2026, 19:30
Верифицирован
01 фев 2026, 19:30
8d6583c
Код
Авторство
О чём код?
import java.util.Objects; public class Adress { private final String country; private final String city; public Adress(String country, String city) { this.country = country; this.city = city; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Adress adress = (Adress) o; return Objects.equals(country, adress.country) && Objects.equals(city, adress.city); } @Override public int hashCode() { return Objects.hash(country, city); } }