Lambdas and Functional Interfaces
Java lambdas and functional interfaces: passing behaviour as an argument, the four core interfaces, method references and captured variables.
Lambdas: short blocks of behaviour, such as how to compare two invoices, passed to a method as an argument. A lambda is an object implementing an interface with one abstract method, and knowing which interface it lands in explains its parameter types, its return type and every restriction on it. It covers what a lambda replaces, functional interfaces, Function, Predicate, Consumer and Supplier, method references, and why a lambda cannot change a local variable. It leaves out writing your own higher-order methods beyond the basics.
Contents
9 cardsnot started