The Collection interface includes various methods that can be used to perform different operations on objects. These methods are available in all its sub-interfaces.
- add() - inserts the specified element to the collection
- size() - returns the size of the collection
- remove() - removes the specified element from the collection
- iterator() - returns an iterator to access elements of the collection
- addAll() - adds all the elements of a specified collection to the collection
- removeAll() - removes all the elements of the specified collection from the collection
- clear() - removes all the elements of the collection