How do you override equals method in employee class in Java?

You’ll need to override that with a return (e1. getID == e2 . getID); The String class overrides equals() and checks for their contents, returning whether they are the same.

Sizin İçin Seçtik  What is the default implementation of equals method in Object class?

Leave a Reply

Your email address will not be published. Required fields are marked *