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 well-designed APIs and the code is fast and uses a small memory footprint. However, their code was written a long time ago and is not in...