The significant new language feature in Java SE 8 is the introduction of Lambda expressions, a way of defining and using anonymous functions. On its own this provides a great way to simplify situations where we would typically use an inner class today. However, Java SE 8 also introduces a range of new classes in the standard libraries that are designed specifically to take advantage of Lambdas. These are primarily included in two new packages: java.util.stream and java.util.function.
After a brief discussion of the syntax and use of Lambda expressions this session will focus on how to use Streams to greatly simplify the way bulk and aggregate operations are handled in Java. We will look at examples of how a more functional approach can be taken in Java using sources, intermediate operations and terminators. We will also discuss how this can lead to improvements in performance for many operations through the lazy evaluation of Streams and how code can easily be made parallel by changing the way the Stream is created.