Migrating from Java 7 to Java 9 | Java 9 New Features & Skills

Jumpstart Your Java 9 Skills | Explore New Features, Lambda Expressions, Collection API, Date/Time API, JShell, Concurrency & More

TT2131

Introductory and Beyond

3 Days

Course Overview

Migrating from Java 7 to Java 9 is a three-day, hands-on fast-track course geared for developers who have prior working knowledge of earlier versions of Java.  Throughout the course students learn the best practices for taking advantage of the new Java Module system as well as other new features in this major update to the Java programming language.

Course Objectives

Students who attend Transitioning From Java 7 to Java 9 will leave this course armed with the required skills to develop maintainable code that easily scales into multi-core environments. Geared for developers currently working in Java 7 who need to migrate their skills or applications to Java 9, this course will teach students everything they need to successfully master and implement the latest features and benefits of Java 9 and become an effective Java 9 developer. 

Working within in an engaging, hands-on learning environment, guided by our expert team, attendees will learn to:

  • Develop modular applications in Java
  • Migrate existing Java applications to the Java 9 platform
  • What functional programming means and what it brings to the table
  • How Lambda expressions and functional interfaces can greatly enhance other aspects of Java
  • Explore the new ‘features’ of the Collection API
  • How to work with default methods and pass methods as arguments
  • To work with the new Date/Time API and other new features
  • To use the new Stream constructs to work with Collections and Collectors
  • Utilize the tooling that is provided in Java 9 to migrate, monitor and optimize applications
  • Use the new JShell tool to quickly test java constructs
  • Improve implementations already using Java 8’s Stream API by utilizing the methods new in Java 9
  • Understand how the implementation of the String class has been updated to decrease the memory footprint
  • Use the enhancements made to the Concurrency API, working with CompletableFuture instance of Thread pools
  • Specific Java 8 features covered include:  Functional programming, Anonymous functions, Lambda expressions and default methods, Streams and Collectors, New Date/Time API
  • Specific Java 9 features covered include: The Java Module System (project Jigsaw); JShell, Updated try-with-resources, Performance enhancements in Java 9, Updates to Collection and Stream API

Course Prerequisites

This course is designed for experienced Java 8 developers who wish to get up and running with Java 9 immediately.  Attendees should have a working knowledge of developing Java 7 applications.

Please see the Related Courses tab for specific Pre-Requisite courses, Related Courses that offer similar skills or topics, and next-step Learning Path recommendations.

 

Course Agenda

Please note that this list of topics is based on our standard course offering, evolved from typical industry uses and trends. We will work with you to tune this course and level of coverage to target the skills you need most.

Session: Introduction

Lesson: Introduction to Java 9

  • Introduction to Java 9
  • Java Community Process (JCP)
  • JDK Enhancement Proposal (JEP)

Session: Evolving Interfaces

Lesson: Evolving Interfaces

  • Interfaces in Java 8
  • Default methods
  • Static methods
  • Multiple Inheritance?

Session: Lambda Expressions; Collections and Streams

Lesson: Lambda Expressions and Functional Interface

  • Lambda Expression Syntax
  • Functional Interfaces
  • Type Inference in Java 8
  • Method references

Lesson: Java 8 Collection Updates

  • Introduce the ConcurrentHashMap
  • Lambda expressions and Collections

Lesson: Streams

  • Processing Collections of data
  • The Stream interface
  • Reduction and Parallelism
  • Filtering collection data
  • Sorting Collection data
  • Map collection data
  • Find elements in Stream
  • Numeric Streams
  • Create infinite Streams
  • Sources for using Streams

Lesson: Collectors

  • Creating Collections from a Stream
  • Group elements in the Stream
  • Multi-level grouping of elements
  • Partitioning Streams

Lesson: Java 9 Collection and Stream Updates

  • Factory methods for Immutable Collection types
  • The takeWhile and dropWhile methods
  • The Stream Iterate and ofNullable methods

Session: Additional Java 8 Enhancements

Lesson: Java Date/Time

  • The Date and Calendar classes
  • Introduce the new Date/Time API
  • LocalDate, LocalDateTime, etc.
  • Formatting Dates
  • Working with time zones
  • Manipulate date/time values

Lesson: Optional

  • Introduce Optional
  • Implement Optional attributes
  • Lambda expressions and Optional

Lesson: Java 8 Concurrency Updates

  • The common thread pool
  • Atomic variables
  • LongAdder and LongAccumulator
  • CompletableFuture
  • Non-blocking asynchronous tasks

Lesson: Java 9 Concurrency Updates

  • Brief overview of Concurrency in Java
  • Overview of CompletableFuture (Java 8)
  • Subclassing the CompletableFuture
  • The default Executor
  • New Factory methods
  • Dealing with time-outs

Session: Java 9

Lesson: New in Java 9

  • Introduce some of the 'smaller' Java 9 topics
  • Java versioning
  • The JDK/JRE file structure
  • Deprecation
  • The jdeprscan tool
  • Multi-Release JAR Files
  • HTML 5 compliant JavaDoc

Lesson: Milling Project Coin

  • Changes made to the language since Java 6
  • Multi-catch
  • Using effectively final variables in try-with-resources
  • Suppressed Exceptions
  • Binary literals
  • Reserved underscore (Java 9)
  • Type inference in anonymous classes (Java 9)
  • @SafeVargs (updates in Java 9)
  • Default and static methods in interfaces (Java 8)
  • Private methods in interfaces (Java 9)

Session: The Java Module system (Jigsaw)

Lesson: Why JigSaw?

  • Problems with Classpath
  • Encapsulation and the public access modifier
  • Application memory footprint
  • Java 8’s compact profile
  • Using internal JDK APIs

Lesson: Introduction to the Module System

  • Introduce Project Jigsaw
  • Classpath and Encapsulation
  • The JDK internal APIs
  • Java 9 Platform modules
  • Defining application modules
  • Define module dependencies
  • Implicit dependencies
  • Implied Readability
  • Exporting packages

Lesson: The Module Descriptor

  • Define module requirements
  • Explain qualified exports
  • Open modules for reflection
  • Use ServiceLoader
  • The provides and uses keywords

Lesson: Working with Modules

  • Being backwards compatible
  • The ModulePath and ClassPath
  • Unnamed Modules
  • Automatic Modules
  • The JLink tool

Session: JShell

Lesson: JShell

  • Introduction to JShell
  • Running Expressions in JShell
  • Importing packages
  • Defining methods and types
  • Using the JShell editor
  • Save and loading state

Session: More Java 9

Lesson: Other New Java 9 Features

  • Enhancements on the Optional class
  • Improvements made in the Process API
  • The Stack-Walking API
  • The HTTP2 Client
  • The Multi-Resolution API

Lesson: Performance Optimizations (Optional)

  • Performance in Java 9
  • Compact Strings
  • String deduplication
  • Ahead-Of-Time Compilation
  • Hotspot Diagnostic commands
  • The G1 Garbage collector
  • Variable and Method Handles

Lesson: Memory Management (Optional)

  • Understand memory management in Java
  • Discuss the various garbage collectors
  • The Garbage-First (G1) Garbage

Course Materials

Each student will receive a Student Guide with course notes, code samples, software tutorials, step-by-step written lab instructions, diagrams and related reference materials and links (as applicable). Students will also receive the project files (or code, if applicable) and solutions required for the hands-on work.

Hands-on Setup Made Simple! Our dedicated tech team will work with you to ensure your student machines and learning environment is setup, tested and ready to go well in advance of the course delivery date, ensuring a smooth start to class and seamless hands-on experience for your students. We offer several flexible student machine setup options including guided manual set up for simple installation directly on student machines, or cloud based / remote hosted lab solutions where students can log in to a complete separate lab environment minus any installations, or we can supply complete turn-key, pre-loaded equipment to bring ready-to-go student machines to your students or in-person facility.  Please inquire for details.

 

Raise the bar for advancing technology skills

Attend a Class!

Live scheduled classes are listed below or browse our full course catalog anytime

Special Offers

We regulary offer discounts for individuals, groups and corporate teams. Contact us

Custom Team Training

Check out custom training solutions planned around your unique needs and skills.

EveryCourse Extras

Exclusive materials, ongoing support and a free live course refresh with every class.

Year-End Savings!
Register today to receive *50% off all 2021 Public Classes*!  Check out our Current Offers for Individuals, Teams and Organizations to Learn for Less!

See our latest Offers and Promotions

Learn. Explore. Advance!

Extend your training investment! Recorded sessions, free re-sits and after course support included with Every Course
Trivera MiniCamps
Gain the skills you need with less time in the classroom with our short course, live-online hands-on events
Trivera QuickSkills: Free Courses and Webinars
Training on us! Keep your skills current with free live events, courses & webinars
Trivera AfterCourse: Coaching and Support
Expert level after-training support to help organizations put new training skills into practice on the job

The voices of our customers speak volumes

Special Offers
Limited Offer for most courses.

SAVE 50%

Learn More