Summary
In this chapter, we worked with many functional programming features included in Java 9 and combined them with everything we discussed so far about object-oriented programming. We analyzed the differences between imperative code and functional programming approaches for many algorithms.
We worked with functional interfaces and lambda expressions. We understood method references and constructor references. We created a data repository with generics and interfaces and we used it to work with filters, map operations, reductions, aggregate functions, sorting and partitioning. We worked with different stream processing pipelines.
Now that you have learned about functional programming, we are ready to take advantage of modularity in Java 9, which is the topic we are going to discuss in the next chapter.