Summary
While we appear to have covered a lot of topics in this chapter, you should recognize that they are all related. Whether you are retrieving records from a database or receiving user input from the keyboard, as soon as there is more than one item, you will need what has been presented here. We began with a basic array that is like a structure in other languages. From the array, we moved on to the Collections Framework. These are dynamic structures that can grow as needed. From the sequential to the map collections, Java provides us with a rich set of choices.
We looked at Generics next. Unlike an array that is declared as a specific type, raw collections can store any object without regard to what has already been stored. Using generic notation, we can tie a collection to a specific data type.
Starting with Java 8, functions became part of the Java language. While ordinary methods in a class can be used as a function, the use of lambdas allows us to define specific actions...