Functional Programming with Streams in Java 9
3.5 (2 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
29 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Functional Programming with Streams in Java 9 to your Wishlist.

Add to Wishlist

Functional Programming with Streams in Java 9

Improve your Java 9 programs using Functional techniques
3.5 (2 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
29 students enrolled
Created by Packt Publishing
Last updated 7/2017
English
Current price: $10 Original price: $125 Discount: 92% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 5 hours on-demand video
  • 2 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Understanding the principles of functional programming and how they contribute to safe parallelism
  • Understanding the new features of Java interfaces, including the notion of functional interface
  • Using lambda expressions and functional interfaces, as a lean alternative to anonymous classes
  • Using streams to perform computations on sequences of data
  • Using streams to seamlessly perform parallel computations with the Java 9 SDK
View Curriculum
Requirements
  • This course is intended for all Java programmers who want to take full advantage of the new functional features of Java, including the opportunity to easily parallelize performance-critical sections of code.
  • Experienced programmers and senior engineers who have already been exposed to the functional paradigm will also benefit from the course, by quickly picking up the Java way to blend object-oriented and functional programming.
  • To follow the course at full speed, the audience is supposed to be familiar with most Java 5 features, including generics and multi-threading, and with the basic interfaces and classes from the Java Collection Framework, namely lists, sets, and iterators.
  • Upon completion, viewers will be able to employ the functional features of Java 9 to write code that is clearer, more efficient and easier to maintain.
Description

Java 8 introduced a wealth of new features, pushing Java towards the so-called functional programming paradigm. Benefits from this shift include succinctness and ease of developing robust multi-threaded applications.

In this course, we will introduce the key functional features of Java 8 and 9, and explain how they can be used to write code that is more expressive and easily amenable to parallelization.

Specifically, we will first discuss lambda functions and functional interfaces. Using these features, programmers can easily create objects that offer a single specific service, similarly to anonymous classes. We will also explore the predefined functional interfaces that can be found in the Java API, starting from well-known pre-existing ones like Comparator and Runnable.

Reaping the full benefits of lambda functions requires employing them with streams, a new kind of collection with built-in parallelization support. We will examine the relationship between streams and collections, and how the latter have changed as a result of the new language features.

Finally, after having mastered the key features of streams, we will consider the details related to parallel execution, such as the crucial notion of side-effect and the fork-join execution model.

About the Author :

Marco Faella is a professor of Computer Science at the University of Naples “Federico II”, Italy. He has taught classes on Java programming, compiler construction, and software engineering to undergraduate and graduate students since 2005. He is the author of over 50 scientific publications in international conferences and journals. He has also developed scientific software in C++, OCaml, Python, and Java.

Marco is fluent in C, C++, OCaml, Python, and Java and has contributed to the Parma Polyhedra Library, a well-known scientific library for symbolic manipulation of polyhedra.

He has an extensive teaching experience in related topics, specifically a course on advanced Java programming with generics, collections, and multi-threading, which he has been teaching for the last 10 years (Linguaggi di Programmazione 2). He’s also writing 4 chapters of an upcoming book (in Italian) on Oracle OCP Java certification.

Who is the target audience?
  • This course is intended for all Java programmers who want to take full advantage of the new functional features of Java, including the opportunity to easily parallelize performance-critical sections of code.
  • Experienced programmers and senior engineers who have already been exposed to the functional paradigm will also benefit from the course, by quickly picking up the Java way to blend object-oriented and functional programming.
  • To follow the course at full speed, the audience is supposed to be familiar with most Java 5 features, including generics and multi-threading, and with the basic interfaces and classes from the Java Collection Framework, namely lists, sets, and iterators.
  • Upon completion, viewers will be able to employ the functional features of Java 9 to write code that is clearer, more efficient and easier to maintain.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
27 Lectures
05:02:53
+
Introducing Functional Programming
5 Lectures 32:41
This video provides an overview of the entire course.
Preview 04:26

This video covers downloading and installing the required software and setup.
Installation and Setup
04:30

What is functional programming and what are its origins? What are its main principles?
What Is Functional Programming?
09:13

What are the new capabilities of Java interfaces? What are default methods? How can we take advantage of these capabilities?
Interfaces get a Boost
08:31

What is a functional interface? What are some functional interfaces in the Java API? How can we declare that an interface is functional?
Some Interfaces are More Functional Than Others
06:01
+
Lambda Expressions
4 Lectures 42:08
What is the basic syntax for lambda expressions? How are lambda expressions related to anonymous classes? What parts of a lambda expression can be omitted?
Preview 09:00

What is type inference and how does it apply to lambda expressions? What are the legal contexts for a lambda expression?
Typing Lambda Expressions
07:29

What variables can lambda expressions access? Does every usage of a lambda expression give rise to a new object?
Capturing Values
12:04

What are method references? What are method references useful for?
Method References
13:35
+
Functional Interfaces
4 Lectures 38:50

What are the functional interfaces that were already present in Java 7? Can they be used as targets of lambda expressions?

Preview 09:09

What functional interfaces were added to Java 8?
New Functional Interfaces
12:01

Are there functional interfaces whose arguments and return types are primitive types?
Functional Interfaces for Primitive Types
06:43

Can we implement a functional interface by composing simple objects?
Composing Functions
10:57
+
Sequential Data Processing with Streams
4 Lectures 42:13
What is a stream? How does it relate to collections and iterators?
Preview 11:32

How can you create a stream?
Creating a Stream
09:00

What do we mean by “lazy operations” and “lazy evaluation”?
Understanding Lazy Evaluation
10:18

What is a monad? In what sense are streams monads?
Streams as Monads
11:23
+
Stream Operations
5 Lectures 01:12:22
How can we select or discard specific elements from a stream?
Preview 14:53

How can I manipulate stream elements? How can I sort a stream?
Transforming and Rearranging Stream Elements
09:00

How can I terminate a stream? How can I summarize a stream into a single object?

Basic Terminal Operations
13:48

What if standard terminal operations do not fit my needs? How can I define a custom terminal operation?
Reductions and Collectors
26:19

Can we avoid wrapping and unwrapping operations when dealing with primitive types?
Streams of Primitive Types
08:22
+
Parallel Streams
3 Lectures 36:00
How can we create a parallel stream? What is a stateless function and how does it help achieve correct and efficient parallel execution of stream pipelines?
Preview 18:39

How do different stream sources and operations behave under parallel execution?
Using Parallel Streams
10:15

How are parallel streams implemented under the hood? What are the functionalities of the fork-join framework?
Looking Under the Hood: The fork-join framework
07:06
+
Functional Exercise
2 Lectures 38:39

How do 2-dimensional games detect collisions between game objects? How can we exploit functional-style programming to improve the performance of collision detection algorithms?

Preview 17:06

How can we further speed up collision detection? How can we build a stream of collisions from a stream of shapes?Is it beneficial to turn every stream into a parallel stream?

Two-Phase Collision Detection
21:33
About the Instructor
Packt Publishing
3.9 Average rating
8,059 Reviews
58,215 Students
686 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.