Using Stream APIs and Collections
By definition, an object-oriented application is one that creates and uses objects, and most useful applications create and manage groups of objects. In fact, maintaining a group, or collection, of objects is done so often that Java’s core library has always included classes designed specifically for that purpose.
To understand why collection classes are so important, let’s briefly examine the alternative and what limitations existed. Before object-oriented programming became popular, procedural languages typically used arrays to maintain groups of related values. Arrays are, of course, supported by ...