What's New in Java 8

A quick overview of most of the new features of Java 8. The course covers lambda expressions and the Stream API but also many new additions scattered all around the JDK. JavaFX and Nashorn are also quickly covered.
Course info
Rating
(588)
Level
Intermediate
Updated
Aug 9, 2014
Duration
4h 15m
Table of contents
Introduction to Lambda Expressions in Java 8
Java 8 Stream API and Collectors
Java 8 Date and Time API
Strings, IO, and Other Bits and Pieces
Introduction to Java FX 8
Nashorn: A JavaScript Engine on the JVM
Description
Course info
Rating
(588)
Level
Intermediate
Updated
Aug 9, 2014
Duration
4h 15m
Description

This course covers the most useful parts of Java 8. This update of the Java platform is the biggest of all. It's even bigger than Java 5 that saw the introduction of generics. We'll begin with lambda expressions and the Stream API, which bring new fundamental patterns to the Java platform. Many problems solved with the Iterator pattern are now solved much more efficiently with the patterns brought by the Stream API. But Java 8 is not only about lambdas, streams and collectors, there is also a new Java Date and Time API which are covered in this course. This API fixes all the flaws of the previous Date/Calendar API and brings new, very useful, concepts and tools. Many new features that bring a functional programming approach have been added to the Collection API. This is also covered in detail. Many more things are covered; little things, scattered here and there in the JDK, like this new StringJoiner class, useful to join strings with a prefix, a postfix, and a separator. JavaFX and Nashorn are also quickly covered, to show the FXML way to describe Graphical User Interfaces, and the new ways to describe JavaFX in Javascript using Nashorn.

About the author
About the author

Passionate about programming computers for over 20 years, Jose made his debut in assembler and C, C for SIMD parallel machines before adopting Java as an object-oriented language. Assistant professor in Paris North University for more than 15 years, Jose also brings his expertise to many projects, in various industrial fields.

More from the author
Eclipse for Java Developers
Intermediate
3h 22m
Apr 5, 2018
Java Fundamentals: Input/Output
Intermediate
3h 56m
Dec 19, 2017
More courses by Jose Paumard
Section Introduction Transcripts
Section Introduction Transcripts

Java 8 Stream API and Collectors
Hello and welcome to the second module of this course, What's New in Java 8. This second module is called Streams & Collectors, and what we are going to see in this module is how to use this new API called the Stream API and see how those streams are going to be connected to collectors. First, let us browse this Module Outline. We'll begin by talking about the map/filter/reduce algorithm. It is a gentle go to them, not particularly related to the Java technology, to the Java language, or to the Java platform, but we need to understand that for the rest of the course. Then we present what is a Stream exactly? It is a brand new notion in Java 8 and new API, so we need to describe that very precisely. And, then, we'll see the main Patterns used to build a Stream. We'll build our first streams of data, and, as a forethought, begin to build operations on a stream.

Java 8 Date and Time API
Hello, my name is Jose, welcome to this third module of this course, What's New in Java 8. We'll talk about this new Java Date and Time API introduced in Java 8. Let us quickly browse the outline of this module. First of all, I would like to make an introduction, why do we need a new Date API in Java 8, and talk about the defaults, the drawbacks, the caveats in this old java. util. Date class. And then I will present this new Date API from Java 8 through 7 key concepts. The first two concepts are Instant and Duration. We'll see what they mean in the context of this new API. And then we will talk about LocalDate and Period, and then TemporalAdjusters. TemportalAdjusters are very powerful tools to make calculations over dates. We'll talk about LocalTime and ZonedTime. You know that when we deal with time and date we need to talk about time zones, and this is precisely what we are going to do here. And at last, we'll talk about Date formatters to format dates and to print out dates, hours, and periods.

Nashorn: A JavaScript Engine on the JVM
Hello, my name is Jose, and welcome to the last module of this course about Java 8 Nashorn. Nashorn is the last JavaScript engine for the JVM, and this is what we are going to talk about in this module. Let us quickly browse the outline of this module. First we'll talk about the Java REPL. Now what is a REPL? We'll see that in details. Basically it will allow us to type Java code inside a JavaScript interpreter and to interact with our Java applications. And then we'll do the opposite, typing JavaScript inside Java code by using the ScriptEngine. Now the ScriptEngine is not particularly new in the Java API, it has been introduced in Java 6, but it has changed a lot with the Nashorn introduction. And at last, we'll see that we can use JavaScript to launch JavaFX applications.