Java 1.8 also introduced some built-in functional interfaces that can be used directly in different lambda expressions. Predicate, Consumer, Supplier, and Function are some of the functional interfaces of the newly created package java.util.function, which will be highlighted in this recipe.