New features of Java 8 (stream, API)

In this course listeners will learn the new features of Java 8. The course covers lambda expressions, data streams, stream data processing with map-filter-reduce approach, asynchronous programming and DateTime API. Every theme has a number of practical exercises.

  • duration 12 hours
  • Language English
  • format Online
duration
12 hours
location
Online
Language
English
Code
JVA-030
price
€ 400 *

Available sessions



Training for 7-8 or more people?
Customize trainings for your specific needs
customize trainings

Description

Welcome to "New Features of Java 8," a detailed and engaging course designed to introduce participants to the groundbreaking enhancements introduced in Java 8. Java 8 brought many long-anticipated features that transformed the language, making it more functional and versatile. This course covers lambda expressions, data streams, the map-filter-reduce approach for stream data processing, asynchronous programming, and the DateTime API. Each topic includes practical exercises to ensure participants can apply their new knowledge effectively.

 

In this course, participants will:

1. Gain a thorough understanding of lambda expressions and their syntax.

2. Learn to use data streams for efficient data processing.

3. Explore the map-filter-reduce approach for stream data processing.

4. Understand and implement asynchronous programming with Java 8.

5. Master the new DateTime API for better date and time management.

 

Key Topics:

  • Lambda Expressions
  • Streams
  • Fork/Join Framework
  • Date and Time API
  • Asynchronous Programming

 

By the end of this course, participants will:

Master Lambda Expressions:

  • Write and use lambda expressions and functional interfaces effectively.
  • Apply method and constructor references and default methods in interfaces.

Utilize Streams Efficiently:

  • Create and manipulate data streams using map-filter-reduce and other stream operations.
  • Implement advanced stream techniques for sequential and parallel data processing.

Apply Fork/Join Framework:

  • Understand and use the Fork/Join framework for parallel processing.

Leverage the Date and Time API:

  • Utilize the new DateTime API classes for robust date and time handling.

Implement Asynchronous Programming:

  • Use CompletableFuture for asynchronous programming and handle complex data flows.
  • Manage multithreading effectively with modern Java approaches.

 

Join us in the "New Features of Java 8" course to unlock the full potential of Java 8's powerful enhancements. Whether you're a seasoned developer seeking to stay updated with the latest advancements or a beginner looking to enhance your Java skills, this course provides valuable insights and practical knowledge to elevate your programming capabilities.

After completing the course, a certificate is issued on the Luxoft Training form

Objectives

To introduce developers to the new features in Java 8.


Target Audience

  • The course is designed for Java developers

Prerequisites

  • Java knowledge is required. Practical experience in Java programming is desirable.

Roadmap

1) Lambda expressions

  • Lambda syntax
  • Functional interfaces
  • Package java.util.function and predefined functional interfaces
  • Method references
  • Constructor references
  • Default methods in interfaces
  • Default methods and diamond problem

2) Streams

  • What is a Stream?
  • Ways to create a Stream
  • Map/Filter/Reduce approach
  • Map/Filter/Aggregate
  • Aggregation functions
  • Reduce in sequental and parallel processing
  • forEach method
  • Consumers chaining
  • Predicates
  • peek method
  • map operation
  • flatmap operation
  • aggregation and reduction
  • Optional type
  • Collectors
  • Using collectors as group by
  • IntStream and other special streams
  • Random stream
  • Parallel streams

3) Fork/Join framework

  • ForkJoinPool
  • Classes used for Fork/Join
  • Fork/Join example
  • Fork/Join and parallel stream processing: benchmarks

4) Date and Time API

  • Problems with Date and Calendar in Java 8
  • LocalDate, LocalTime, LocalDateTime
  • Instant class
  • Clock class
  • ZonedDateTime
  • DayOfWeek class
  • Duration class
  • Period class

5) Asynchronous programming

  • Problems with multithreading
  • Parallel and asynchronous programming
  • Benefits of asynchrnous approach
  • Java 1 approach to multithreading
  • Java 5 approach: Future class
  • Java 8 approach: CompletableFuture class
  • Data flow as a pipeline
  • Starting several pipelines in parallel
  • Composing futures
  • Combining futures
  • Synchronous and asynchronous CompletableFuture methods
  • Using anyOf/applyToEither to get the winner result
  • Summary of CompletableFuture methods
  • Handling exceptions in CompletableFuture
  • Using checkpoints in method handling
  • Cancellation of CompletableFuture
  • Using CompletableFuture in real-life data flow processing
  • Asynchronous APIs in Java

Leszek Gawron
  • Trainer

Leszek Gawron

Team leader, Java/Kotlin developer


Related courses

You may also be interested in

Discover more about professional growth and skills development

contact us