OCP exam objectives covered in this chapter:
- Programming Abstractly Through Interfaces
- Declare and use List and ArrayList instances
- Understanding Lambda Expressions
When we covered the Java APIs in the previous chapter, we didn’t cover the ones that use lambda syntax. This chapter remedies that! You’ll learn what a lambda is used for, about common functional interfaces, how to write a lambda with variables, and the APIs on the exam that rely on lambdas.
Writing Simple Lambdas
Java is an object-oriented ...