Fast Track to Java 8

  • 2 Days
  • Intermediate
  • Virtual | Classroom
  • £ On Request

Understand the full range of features arriving in Java 8 and learn how to start using them immediately

Book For My Team

Overview

Java 8 is the most important update to Java since its inception. The limits of the existing language have been exposed by the challenge of multi-core hardware, the industry adoption of functional principles, the continued evolution of C# and the growing adoption of alternative JVM languages like Scala and Clojure.

This new release of Java aims to address these concerns via new language features, enhancements to existing libraries and numerous low level improvements to the JVM itself. Developers can use these enhancements to write shorter, safer applications that are amenable to multi-core devices.

This course enables experienced Java developers to understand the full range of features arriving in Java 8 and to start using them immediately.

Outline

Overview of What’s New

  • The introduction and assimilation of lambdas into Java
  • Functional and parallel support within the code libraries
  • The new Date and Time (JSR 310) and Type Annotation (JSR 308) API’s
  • Many additional libraries and virtual machine enhancements

Working With Lambda Expressions

  • Understanding the concept and purpose of lambdas
  • The various syntax options when declaring lambdas
  • Lexical scoping and ‘effectively final’ variables
  • Method references as shortcuts to lambdas
  • Type inference of parameters in lambdas
  • Best practices when declaring and using lambdas
  • Declaring interfaces to be used with lambdas
  • Making use of the @FunctionalInterface annotation
  • How lambdas are implemented at the bytecode level
  • Limitations of lambdas compared to other languages

Functional Programming With Lambdas, Collections and Streams

  • Introducing the java.util.stream.Stream interface
  • Creating streams of objects from collections and via of
  • Using parallel and sequential to switch processing model
  • Performing filtering and mapping on the contents of streams
  • Using reduce to compute a final value from a stream
  • Understanding the purpose and value of flatMap
  • Performing bulk operations on the elements of collections
  • The Optional Monad and Monadic Composition

Other Language Features

  • Default implementations for interface methods (aka Extension Methods)
  • Parallel array sorting using new methods in java.util.Arrays
  • Enhancements to type inference (aka Generalized Target-Type inference)
  • Better support for globalization (Unicode 6.2 and BCP 47 language tags)
  • Scalable thread-safe counters in java.util.concurrent
  • Enhancements to reflection using the javax.lang.model types
  • Standardised support for Base 64 encoding and decoding
  • Programmatic support for working with JavaDoc
  • Improvements in the security libraries
  • Support for unsigned integer arithmetic via static methods

The Date and Time API

  • How JSR310 evolved from the Joda Time library
  • Working with instants, clocks and time zones
  • Performing calculations with dates and times
  • Using adjusters to make common changes to dates
  • Parsing and formatting dates and times
  • Combining the API with legacy code

Enhancements to Annotations

  • Limitations on existing support for annotations
  • How annotating usage enables stronger code contracts
  • Annotating type parameters in generic code
  • Annotating inheritance relationships
  • Annotating exception specifications
  • Annotating calls to new, instanceof and casts
  • Using annotations multiple times on the same type

JVM and JDK Improvements

  • Compact profiles for the JVM
  • How HotSpot merges with JRockit in Java8
  • Why the PermGem region has been removed
  • Retirement of some garbage collection settings
  • Enhancements to the invokedynamic instruction
  • Enhanced control of the Java compiler at runtime
  • The Nashorn JavaScript compiler

Requirements

  • Delegates must be proficient in Java 7 with several years of experience developing in industry.
Garth Gilmour
Google Developer ExpertGoogle Developer Expert

25 years coding and educating. 1000+ deliveries of (almost) everything to everyone.

Follow Garth
Ryan Adams

Used to make software for learning as a developer, now helping software makers learn.

Follow Ryan
For a breakdown of what to expect in our training, check out our training overview page.

Good coverage of the new Java 8 functional features, great building on fundamentals of procedural/oop, and decent run through generics as well. Garth is an amazing tutor and kept me interested the whole way through with his enthusiasm, passion and expertise.

Deloitte logo
Atlassian logo
Workday logo
BMW logo
Amex logo
McAfee logo
PWC logo