Table of Contents
Chapter 1 – Java 8 and Interface Enhancements
Default Methods and Functional Interfaces
Understanding the Importance of Default Methods
Using Inheritance with Default Methods
Working with Single Inheritance
Working with Multiple Inheritance
Understanding how Diamond Inheritance Works
Resolving Overridden Default Methods
Using Default Methods to Supplement Adapter Classes
Using Default Methods in Core Java Classes
Using a Class to Support Default Methods
Understanding the Difference between an Abstract Class and Interfaces
Using Static Interface Methods
Creating a Functional Interface
Using the @FunctionalInterface Annotation
Overriding Object Class Methods in a Functional Interface
Using Functional Interfaces in the Core Libraries
Chapter 2 – Lambda Expressions
Understanding Lambda Expressions
Inferring the Type of the Target
Lambda Expression Syntax Rules
Eliminating the Block Statement
Using Multiple Statements in a Lambda Expression Body
Writing Succinct Lambda Expressions
Capturing Variables in a Lambda Expression
Differentiating between a Lambda Expression and a Closure
Method and Constructor References
Using Static Method References
Using Instance Method References
Working with Lambda Expressions
Using Lambda Expressions with Variable Declarations
Using Lambda Expressions as a Return Value
Using Exceptions with a Lambda Expression
Using Lambda Expressions with the Tertiary Operator
Using Lambda Expressions to Initialize an Array
Writing Recursive Lambda Expressions
Using the java.util.function Functional Interfaces
Using the BiFunction Interface
Using Operator Type Interfaces
Using the UnaryOperator Interface
Using the BinaryOperator Interface
Streams Do Not Modify the Original Source
Using the Stream Interface’s of Method
Using the Collection Class’ stream Method
Using a Stream.Builder Interface
Using the forEachOrdered Method
Using the Collector Interface and the collect Method
Using the max, min, and count Methods
Understanding Lazy and Eager Evaluation
Using Parallel Stream Operations
Understanding the Standard Method Names
Understanding the of Type Methods
Understanding the parse Method
Understanding the format Method
Understanding the get Type Method
Understanding the is Type Methods
Understanding the with Type Methods
Understanding the plus Type Methods
Understanding minus Type Methods
Understanding the to Type Methods
Understanding the at Type Methods
Overview of the Date and Time Packages
Working with the Instant Class
Creating an Instant Based on the Epoch
Creating an Instant Based on Parsing a UTC String
Creating an Instant by Adding or Subtracting a Time from an Instant
Using the Instant Class’ get Type Methods
Creating Offsets Using the of Type Methods
Creating Offsets Using the with Type Methods
Creating a Duration Using the parse Method
Creating a Duration by Adding or Subtracting a Unit
Creating Date and Time Classes
Date and Time get Type Methods
Using the YearMonth, MonthDay, and Year Classes
Using the Enumerations DayOfWeek and Month
Using the DayOfWeek Enumeration
Working with the Time Zone and Offset Classes
Formatting, Queries, and Value-Based Classes
Understanding Value-Based Classes
Using the Nashorn JavaScript Engine
Executing Java Code from JavaScript
Using the FileFilter Interface
Using the PathMatcher Interface
Using the Files Class’ list Method
Using the Files Class’ walk Method
Using the Path Class’ lines Method
Using the Arrays Class’ parallelSort Method
Using the Arrays Class’ parallelSetAll Method
Using the Arrays Class’ parallelPrefix Method
Using the forEachRemaining Method
Using the replace Type Methods
Using the compute Type Methods
Project Jigsaw and Compact Profiles