Chapter 6Lambdas and Functional Interfaces
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 ...
Get OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.