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 .
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 .