Java collections

Collections are interfaces and classes that help us store more than one object. We have already seen arrays, which can do that. We have also seen ArrayList in the previous chapters. We did not discuss in detail what other possibilities there are in the JDK. Here, we will go into more detail but leave the streams and the functional methods for later chapters, and we will also refrain from going into details. That is rather the task of a reference book.

Using the implementation of the collection classes and interfaces reduces the programming effort. First of all, you do not need to program something that is already there. Secondly, these classes are highly optimized, both in implementation and in their features. They have very ...

Get Java Projects - Second 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.