Name
Introduction to Java SE 8

Code
3431

Duration
16 Hours

Description
This course overviews the important additional capabilities that were introduced in Java 8. The course starts with in-depth overview for inner classes (including anonymous ones). The understanding of this topic is crucial for understanding lambda expressions, and given the fact that most developers don't have in-depth understanding for this topic it is crucial to cover it. The course continues with in-depth coverage for lambda expressions using practical code samples. The next topics covered by the course (functional interfaces, streams, Optional class, Date-Time api) are delivered together with additional practice of lambda expressions, the main additional capability introduced by Java 8. The course concludes with covering the capabilities for integrating JavaScript into our code in Java while using the Nashorn, the new JavaScript engine that was introduced in Java 8.

Population
Java developers.

Objectives
Become familiar with Java 8 new capabilities

Prerequisites
Practical experience in software development using the Java programming language.

Topics
Inner Classes
Simple Inner Classes
Inner Classes within Methods
Anonymous Inner Classes
Static Inner Classes
Default Methods
What is a Default Method?
When to use Default Method?
Lambda Expressions
What is a lambda expression?
The Syntax
Simple Code Samples
Functional Interfaces
Methods References
Reference to Static Method
Reference to Static Method
Reference to Instance Method
Reference to Instance Method of an Arbitrary Object
Reference to Constructor
Functional Interfaces
What is a Functional Interface
The BiConsumerU> Interface
The BiFunctionU> Interface
The BinaryOperator Interface
The BiPredicateU> Interface
The Predicate Interface
The FunctionR> Interface
The UnaryOperator Interface
Streams
Introduction
The stream() Method
The parallelStream() Method
The forEach() Method
The map() Method
The filter() Method
The sorted() Method
Optional Class
The Optional Class
The Optional.ofNullable Method
The Optional.of Method
The Optional.orElse Method
Code Samples
Date-Time API
Introduction
Improvements
The LocalDateTime Class
The LocalDate Class
The LocaTime Class
The ZoneID Class
The ZonedDataTime Class
The ChronoUnit Enum
The Duration Class
The Period Class
The TemporalAdjusters Class
JavaScript Integration
Introduction
The Nashorn JavaScript Engine
The jjs Utility
The jjs Interactive Mode
Calling JavaScript from Java
Calling Java from JavaScript
JSON
Introduction
The Java API for JSON
Code Sample