Working with the Collection interface
Last updated
Last updated
The interface Collection represents a group of objects known as its elements. There is no direct implementation of Collection; no concrete class implements it. It’s extended by more-specific interfaces such as Set, List, and Queue. This collection is used for maximum generality—to work with methods that can accept objects of, say, Set, List, and Queue. Figure below shows the basic Collection interface and its main subinterfaces.