Using Lambdas and Streams in Java 8

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.

Speaker:

Simon Ritter manages the Java Technology Evangelist team at Oracle Corporation. Simon has been in the IT business since 1984 and holds a Bachelor of Science degree in Physics from Brunel University in the U.K. Originally working in the area of UNIX development for AT&T UNIX System Labs and then Novell, Simon moved to Sun in 1996. At this time he started working with Java technology and has spent time working both in Java development and consultancy…

This talk was presented at the IndicThreads 2015 Conference held in Pune, India

Content Team

The IndicThreads Content Team posts news about the latest and greatest in software development as well as content from IndicThreads' conferences and events. Track us social media @IndicThreads. Stay tuned!

Leave a Reply