What does the add() method in a Collection return?

Last Updated :
Discuss
Comments

What does the add() method in a Collection return?

A boolean value indicating success or failure

The added element



A reference to the collection itself

An index of the added element

Share your thoughts in the comments