From 8a2b1025e7e86d3aaa7205ad82c0278914f69e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B0=D0=BF=D1=83=D1=81=D1=82=D0=B8=D0=BD=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Sun, 10 Sep 2023 20:33:43 +0300 Subject: [PATCH] Core #37. --- src/main/java/ru/core/l2/collections/linkedl/Main.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/core/l2/collections/linkedl/Main.java b/src/main/java/ru/core/l2/collections/linkedl/Main.java index 9e39104..73841de 100644 --- a/src/main/java/ru/core/l2/collections/linkedl/Main.java +++ b/src/main/java/ru/core/l2/collections/linkedl/Main.java @@ -6,7 +6,9 @@ public class Main { public static void main(String[] args) { Car firstCar = new Car("BMW", 1); Car secondCar = new Car("BMW", 1); - System.out.println(firstCar == secondCar); System.out.println(firstCar.equals(secondCar)); + + System.out.println(firstCar.hashCode()); + System.out.println(secondCar.hashCode()); } }