I have a Employee class with many attributes. One of the attributes is employeeId which is of type int.
Can I have hascode function for Employee as follows?
int hashCode(){
    return new Integer(employeeId).hashCode();
}
Is it efficient?
How about:
return employeeId;
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With