Using Java 8’s New Features

Course Number:

NTXJVA115

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.

Audience:

Course Duration:
2 days

Prerequisites:

Course Objectives:
  • Be familiar with the additions to Java interfaces
  • Understand and use functional interfaces
  • Understand lambda expressions and method references, and use them to pass behavior (methods)
  • Learn about the pre-defined functional interfaces, and use them with lambda expressions
  • Understand and use the Stream API
  • Process collections using streams
  • Understand and use parallel streams
  • Learn and use the new Data/Time API
  • Become familiar with other new capabilities
Course Outline:
  • What’s New in Interfaces
    • Static Methods
    • Default Methods
    • Functional Interfaces
  • Introducing Lambda Expressions
    • Inner and Anonymous Classes – Uses and Shortcomings
    • Lambda Expression Overview
    • Lambda Expressions and Functional Interfaces
    • Using Lambda Expressions
    • Working with Method References
  • The Stream API
    • What are Streams?
    • Streams and Collections
    • Filtering Collections
    • Chaining and Pipelining
    • Processing Techniques
    • Extracting Data
      • Searching for Data
      • Sorting
      • Performing Calculations
  • The Built in Lambda Types
    • Functional Interfaces in java.util.function
    • Using Predicate
    • Using Consumer and Supplier
    • Using Other Lambdas
  • Parallel Processing / Concurrency
    • Overview
    • Requirements
    • Executing Stream Pipeline in Parallel
    • Concurrency with Lambdas
    • Issues
    • Performance
  • Date/Time API
    • Overview and Limitations of Previous API
    • The Date/Time API (JSR 310)
    • Date-Based and Time-Based Events
    • Timestamps, Periods, and Durations
    • Performing Calculations
    • Formatting
    • Localization / Time Zones
  • Other Capabilities
    • Using Optional Instead of null
    • Nashorn JavaScript Engine
    • Minor New Features

Related Posts

About Us

IT Training, Agile Ways of Working and High Impact Talent Development Strategies

Let Us Come to You!

Classes recently delivered in: Atlanta, Boston, Chicago, Columbus, Dallas, Detroit, Indianapolis, Jerusalem, London, Milan, New York, Palo Alto, Phoenix, Pittsburgh, Portland, Raleigh, San Antonio, San Diego, San Francisco, San Jose, Seattle, Springfield, Mass., St. Louis, Tampa and more!