Google News
logo
Java Collections - Interview Questions
What is the need for overriding equals() method in Java?
The initial implementation of the equals method helps in checking whether two objects are the same or not. But in case you want to compare the objects based on the property you will have to override this method.
Advertisement