June 2018
Beginner
722 pages
18h 47m
English
In fact, you have already seen elements of functional programming in our demonstration code. One example is the forEach(Consumer consumer) method, available for every Iterable, where Consumer is a functional interface. Another example is the removeIf(Predicate predicate) method, available for every Collection object. The passed-in Predicate object is a function – an implementation of a functional interface. Similarly, the sort(Comparator comparator) and replaceAll(UnaryOperator uo) methods in the List interface and several compute() methods in Map are examples of functional programming.
Read now
Unlock full access