How does a ArrayList’s contains() method evaluate objects?

ArrayList implements the List Interface.

If you look at the Javadoc for List at the contains method you will see that it uses the equals() method to evaluate if two objects are the same.

Leave a Comment