Java Lambdas and the Stream API Bringing Functional Programming to Java

  • Jim McLaughlin

Your browser needs to be JavaScript capable to view this video

Try reloading this page, or reviewing your browser settings

You're watching a preview of subscription content. Log in to check access

Come up to speed with Java functional programming and write effective Java code with less effort using lambdas and the stream API. Make your Java project code more reliable by using the declarative approach provided by these new Java features. Learn how to leverage the updated collections API to facilitate common functional programming patterns such as map/filter/reduce. If you’ve ever stumbled through constructing for loops and while loops, this video will add to your programming toolbox and allow you to leave such heavy lifting to the stream API.

You’ll begin your journey with the syntax of Java lambdas, what they are, and how to use them. You will then be introduced to Java streams and the various ways of creating them for the purpose of processing data. You will also learn about the updates which have been made to the Java collections API for supporting streams. Along the way you will be taught the streams API and how to use the methods defined in the Stream class to process data sources to obtain the results you desire by employing lambdas with the Stream class’ operations.

What You Will Learn

  • Write functional interfaces for defining lambdas

  • Master lambda syntax for implementing anonymous functions

  • Create streams associated with data sources

  • Process data through stream operations

  • Use method references for simplifying lambda expressions

  • Discover parallel and sequential streams and how they differ

Who This Video Is For

Software developers familiar with Java who wish to employ functional programming techniques in their software projects in order to write reliable, compact, and easy-to-read Java code.

About The Author

Jim McLaughlin

Jim McLaughlin is the lead technical architect at YRCW, a full stack developer, and advocate of functional programming. With over 30 years of software development experience, he speaks on functional programming and is active in several user groups including the Kansas City Java Users Group. He also leads the Operation Code: KC group, dedicated to mentoring and helping veterans and military spouses who are interested in software development careers.

 

Supporting material

View source code at GitHub.

About this video

Author(s)
Jim McLaughlin
DOI
https://doi.org/10.1007/978-1-4842-5594-0
Online ISBN
978-1-4842-5594-0
Total duration
1 hr 1 min
Publisher
Apress
Copyright information
© James McLaughlin 2019

Related content

Video Transcript

Hello, and welcome to this course on Java lambdas and the streams API. Lambdas and streams are a powerful update to the Java platform and bring functional programming to the Java ecosystem.

Now, before I jump into the details of lambdas and streams, let me introduce myself. My name is Jim McLaughlin, and I’m a full stack developer with 32 years of software development experience. And I’ve spent the majority of my professional career working with Java. Currently, I’m the lead technical architect at YRC Worldwide, a shipping and logistics company based in the greater Kansas City metro area. And I enjoy speaking and giving presentations on Java topics to user groups and technical conferences.

In this video series, we’ll learn about the functional interfaces used for defining lambdas, lambda functions and their syntax, Java Streams and how to create and associate them with data sources, and how to process data with stream operations like filter, map, and reduce. When you finish, you’ll be able to create a stream associated with a data source, apply stream operations such as filter, map, and reduce, and define and use lambda functions. Now, this course does assume that you have some basic understanding of Java, including classes, abstract classes, and interfaces. So let’s get started.