This commit is contained in:
2026-05-25 17:06:40 +04:30
parent 83746b88f6
commit e50d722242
11 changed files with 148 additions and 11 deletions
+6 -4
View File
@@ -45,9 +45,7 @@ public class Student {
// Return custom hash
// Example:
// return id % 97;
return 0;
return id % 97;
}
@Override
@@ -64,7 +62,11 @@ public class Student {
// Step 3:
// Compare IDs
return false;
if (obj == this) return true;
if (obj == null || obj.getClass() != getClass()) return false;
Student student = (Student) obj;
return student.getId() == id;
}
@Override