title
Please take a moment to fill out this form. We will get back to you as soon as possible.
All fields marked with an asterisk (*) are mandatory.
Java 8 New Features
Course Description
Overview
Java 8 introduces a number of revolutionary capabilities - many of them centered on lambda expressions and functional-style programming. These capabilities add powerful new programming techniques to the language, but also add complexity. This concise course is focused on introducing the new capabilities and how to use them. It includes numerous code examples and programming labs that illustrate all of the new capabilities. The course is hands on, and requires that students be comfortable with writing general Java code at an intermediate level, including the use of interfaces. The student kit consists of a student workbook and lab manual. All labs are done within the Eclipse IDE, and the lab instructions include detailed directions on using it.Objectives
- New interface capabilities
- Lambda expressions and method references
- Functional interfaces
- Java Streams
- New parallel processing capabilities and the Stream API
- New Date / Time API
Audience
Prerequisites
-
The course is hands on, and requires that students be comfortable with writing general Java code at an intermediate level, including the use of interfaces.
Topics
- Workshop Overview
- Workshop Agenda
- Typographic Conventions
- Labs
- Lesson Objectives
- Interfaces – Quick Review
- Interfaces – Example
- Default Methods
- Default Methods – Example
- Motivation and Benefits of Default Methods
- Motivation and Benefits of Default Methods
- Inheritance Issues
- Static Methods
- Benefits of Static Methods
- Functional Interface – Defined
- Functional Interfaces – Details
- Case Study – Comparator
- Lab 1.1: Setup, Default Methods, Static Methods
- Review Questions
- Lesson Objectives
- Motivation: Common Actions Are Verbose
- Too Much Window Dressing
- Introducing Lambda Expressions
- Functional Interfaces and Lambdas
- Lambdas Occur in a Target Context
- Relationship to Functional Interfaces
- Lambda Expression Syntax – Overview
- Lambda Compatibility
- What about the Parameter Types?
- Lambda Expression Syntax – Details
- Lambda Expression Syntax – Details
- What's the Big Deal? Where Do I Use Them?
- Lab 2.1: Getting Started with Lambdas
- Lambdas Can Leverage Existing Code
- Lambdas and Local Variables
- Variable Capture in Lambdas – Example
- Method References
- Types of Method References
- Recipes to Use Method References
- Refactoring Lambdas into Method References
- Lab 2.2: Method References
- The Other Side of the Method Call
- Using a Functional Interface Type – Example
- Review Questions
- Lesson Objectives
- Collections Are Great...for What They Do
- Collections Have Shortcomings
- Analogy: Data vs. DBMS
- Analogy: Collections = Data, Streams = DBMS
- Streams – Before and After
- What Are Streams?
- Anatomy of a Stream – Details
- Anatomy of a Stream – Illustrated
- Streams vs. Collections
- Stream Example – a First Look
- Stream API – Overview
- Using the Stream API – Illustrated
- Chained Method Calls – Illustrated
- Keys to Understanding the API
- Keys to Understanding the API
- Java 8 Functional Interfaces
- Functional Interface: Predicate<T>
- Functional Interface: Comparator<T>
- Functional Interface: Function<T,R>
- filter(Predicate)
- sorted() sorted(Comparator)
- Comparator.comparing() – Details
- Comparator Methods Added in Java 8
- Comparator Chaining – Example
- Lab 3.1: Filtering and Sorting
- map(Function)
- map(Function) – Example
- Functional Interface: Consumer<T>
- peek(Consumer)
- 'Trimming' Operations of Stream
- Terminal Operations of Stream
- Terminal void Operations – Example
- Terminal Reduction Operations
- Terminal Reduction Operations – Example
- Existence Operations of Stream
- Finder Operations of Stream
- Statistics Operations
- Lab 3.2: Advanced Stream Processing
- Role and Capabilities of Collectors
- Collectors – Our Approach
- Collectors.toList() and .toSet()
- Functional Interface: Supplier<T>
- Collectors.toCollection()
- Stream.collect(Collector) Method – Details
- Collector Interface – Details
- Determining a Collector's Product
- Determining a Collector's Product
- Lab 3.3: Getting Started with Collectors
- Partitioning and Grouping – Overview
- Partitioning Collectors
- Grouping Collectors
- Lab 3.4: Partitioning and Grouping
- Reducing and Summarizing Collectors
- Determining Their Products – Revisited
- Reducing Collectors Have Two Roles
- Standalone Reduction Collector – Example
- Downstream Reduction Collector – Example
- Downstream Reduction Collector – Example
- mapping() Collector
- joining() Collector
- Building a Custom Map
- Other Uses for Downstream Collectors
- Lab 3.5: Reducing and Summarizing
- Review Questions
- Lesson Objectives
- Parallelism – Overview
- Sequential Processing – Illustrated
- Parallel Processing – Illustrated
- Java 8 Parallel Processing
- Stream Parallel Processing – Example
- Enabling Parallel Processing
- Lab 4.1: Simple Parallel Processing
- parallel() and sequential() – Details
- Parallel Streams Use Fork/Join
- Fork/Join – Illustrated
- Parallel Processing – Ground Rules
- Parallel Processing – Ground Rules
- Parallel Processing – Guidelines
- Parallel Processing – Guidelines
- Parallel Processing – Guidelines
- Lab 4.2: Looking at Performance
- Overview of Multithreading
- Singlethreaded / Sequential Example
- Multithreaded / Parallel Example
- Race Conditions
- Data Synchronization
- Using a Mutex
- Parallel Streams and Shared Mutable State
- Lab 4.3: Data Integrity
- Review Questions
- Lesson Objectives
- Previous Java Date/Time Support – History
- Java 8 Date/Time Support – Overview
- How We'll Cover the API
- Date and Time Classes – Overview
- Creating Dates and Times
- Creating Dates and Times – now() and of()
- Creating Dates and Times – parse()
- Formatting Dates and Times – format()
- Accessing Date and Time Fields
- Accessing Date and Time Fields – getXXX()
- Accessing Date and Time Fields – get()
- Comparing Instances
- Lab 5.1: Working with Dates and Times
- Deriving New Values
- Deriving New Values – withXXX()
- Deriving New Values – with()
- Adding and Subtracting
- Adding / Subtracting – plusXXX()/minusXXX()
- Adding and Subtracting – plus() / minus()
- Instant
- Time-Zones
- ZonedDateTime
- Determining 'Equivalent' Local Time
- Lab 5.2: Deriving New Values
- Intervals of Time – Period and Duration
- Interval between Two Dates/Times
- Creating Custom Intervals
- Adding an Interval to a Date/Time
- Adding and Subtracting Intervals – Example
- Lab 5.3: Periods and Durations
- Review Questions
- Compact Profiles
- Optional<T> – a Deeper Look
- Repeatable Annotations
- Type Annotations
- Nashorn JavaScript Engine
- Other Additions / Improvements
- Deprecated Features
- Recap of What We've Done
- Resources
Related Courses
-
Java for Advanced Programmers
EJCJ-361- Duration: 3 Days
- Delivery Format: Classroom Training, Online Training
- Price: 1,755.00 USD
-
Programming Fundamentals Using Java
EJCJ-380- Duration: 4 Days
- Delivery Format: Classroom Training, Online Training
- Price: 2,340.00 USD
Self-Paced Training Info
Learn at your own pace with anytime, anywhere training
- Same in-demand topics as instructor-led public and private classes.
- Standalone learning or supplemental reinforcement.
- e-Learning content varies by course and technology.
- View the Self-Paced version of this outline and what is included in the SPVC course.
- Learn more about e-Learning
Course Added To Shopping Cart
bla
bla
bla
bla
bla
bla
Self-Paced Training Terms & Conditions
Exam Terms & Conditions
Sorry, there are no classes that meet your criteria.
Please contact us to schedule a class.
STOP! Before You Leave
Save 0% on this course!
Take advantage of our online-only offer & save 0% on any course !
Promo Code skip0 will be applied to your registration
Purchase Information
title
Please take a moment to fill out this form. We will get back to you as soon as possible.
All fields marked with an asterisk (*) are mandatory.