Question: Q 3 ( 1 0 ) : Let's say we would like to override equals ( ) method of a Student class. Two students are
Q: Let's say we would like to override equals method of a Student class. Two students are considered equal if they have same last name and date of birth. Would it be ok to override the hashCode method such that it returns an integer using:
a Student ID only
b Student Last Name birthdate
c Student birthdate only
Please briefly explain each part and provide your reasoning?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
