16.7 Collections Methods

Class Collections provides several high-performance algorithms for manipulating collection elements. The algorithms (Fig. 16.5) are implemented as static methods. The methods sort, binarySearch, reverse, shuffle, fill and copy operate on Lists. Methods min, max, addAll, frequency and disjoint operate on Collections.

Image

Fig. 16.5 | Collections methods.

Image Software Engineering Observation 16.5

The collections framework methods are polymorphic. That is, each can operate on objects that implement specific interfaces, regardless ...

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.