Advanced Java 8 Programming

Explore Next-Level Java Skills with Lambda Expressions, Collection API, Concurrency, Performance, JVM, CDI, Best Practices & More

TT3103-J8

Intermediate and Beyond

3 Days

Course Overview

Advanced Java 8 Programming is a comprehensive hands-on advanced Java training workshop geared for experienced developers who wish to explore specific advanced programming APIs and techniques.  This course explores common ‘next-level’ Java development tasks beyond a core knowledge base, exploring new features in Java 8 and how to harness and apply them to improve application development efforts and performance.

Course Objectives

Students who attend Advanced Java 8 Programming will leave this course armed with the required skills to improve their Java applications using sound coding techniques and best practices.

This “skills-centric” course is about 50% hands-on lab and 50% lecture, designed to train attendees in advanced development skills, coupling the most current, effective techniques with the soundest industry practices. Working in a hands-on learing environment guided by our expert team, attendees will learn to:

  • Understand functional programming means and what it brings to the table
  • Understand how Lambda expressions and functional interfaces can greatly enhance other aspects of Java
  • Use the new Stream constructs to work with Collections and Collectors
  • Become familiar with the methods of the Collection API introduced in Java 8
  • Work with default methods
  • Use the new features to support concurrency in multi-core systems
  • Understand and work with the JavaScript engine Nashorn
  • Explore the Java Virtual Machine (JVM)
  • Work Java and JEE’s version of dependency injection (CDI)
  • Implement a WebSocket endpoint
  • Use Java Bean validation

Specific Java 8 features that are covered in the course include:

  • Lambda Expressions; Streams; Collectors; Interface methods; Lambda expressions and Collections

Need different skills or topics?  If your team requires different topics or tools, additional skills or custom approach, this course may be further adjusted to accommodate.  We offer additional Java, JEE and Java for Web application development, design, testing, services, application security and other related topics that may be blended with this course for a track that best suits your needs. Our team will collaborate with you to understand your needs and will target the course to focus on your specific learning objectives and goals.

Course Prerequisites

This in an intermediate and beyond level Java development course geared for students experienced with Java 8 programming essentials who wish to quickly get up and running with advanced Java skills.  This course does not cover Java programming fundamentals.

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’ll work with you to tune this course and level of coverage to target the skills you need most.

Session: Java 8 Quick Review

Lesson: Evolving Interfaces

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

Session: Lambda Expressions; Collections and Streams

Lesson: Introduction to Lambda Expressions

  • Functional vs OO Programming
  • Anonymous Inner classes
  • Lambda Expression Syntax
  • Functional Interfaces
  • Method references
  • Constructor references

Lesson: Java 8 Collection Updates

  • Introduce the ConcurrentHashMap
  • Lambda expressions and Collections
  • Lab: Functional 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
  • Lab: Working with Streams

Lesson: Collectors

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

Session: Additional Java 8 Enhancements

Lesson: Optional

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

Lesson: Other new Java 8 features

  • StringJoiner
  • Repeating and Type Annotations
  • Parallel Array Sorting
  • Improved type inference
  • Method parameter reflection
  • Updated command line tooling

Lesson: Java 8 Concurrency Updates

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

Lesson: Nashorn JavaScript Engine

  • Working with JavaScript and Java
  • Accessing Nashorn
  • Executing JavaScript from Java
  • Executing Java from JavaScript
  • Implementing a Java Interface
  • Alternatives to Nashorn
  • Lab: Using JavaScript

Session: Best Practices and Performance

Lesson: Java Virtual Machine

  • Architecture of the JVM
  • Application Execution

Lesson: Introspection and Reflection

  • Reflection classes
  • Introspection
  • Dynamic invocation of methods
  • Using annotations
  • Type annotations
  • Receiver parameter
  • Lab: Introspection and Reflection
  • Lab: Reflection Server

Lesson: Reference Objects

  • List the kinds of object references available in Java
  • Introduce Weak, Soft and PhantomReference
  • Explain the ReferenceQueue

Session: Java 8 Performance

Lesson: Performance and Java 8

  • Performance Across Java Versions
  • Tiered Compilation
  • Nashorn versus Java 7's JavaScript Engine
  • Lambda Expressions versus Inner Classes
  • Impact of Streams versus Collections
  • Date/Time Classes
  • I/O Stream Recommendations
  • Encoding/Decoding
  • Strings and Spring Interning

Session: Contexts and Dependency Injection (CDI)

Lesson: Introduction to CDI

  • Context Dependency Injection (CDI)
  • The @Inject Annotation
  • The @Default Annotation
  • The @Alternative Annotation
  • The @Named Annotation
  • Lab: Using CDI

Lesson: Using CDI

  • Qualifiers
  • @PostConstruct and @PreDestroy
  • The @Produces Annotation
  • Lab: Using Qualifiers

Session: Java API for WebSocket

Lesson: Introduction to WebSocket

  • Java API for WebSocket Overview
  • Using WebSocket in Java EE
  • Endpoint Instances

Lesson: Implementing WebSocket Endpoint

  • Annotated Endpoints
  • Receiving messages
  • Send Response to Client(s)
  • JavaScript to Setup a WebSocket Connection
  • Lab: Implementing a WebSocket

Lesson: Extending WebSockets

  • Manage Client State
  • Encoding and Decoding Messages
  • Handling Errors
  • Lab: Encoding and Decoding Messages

Session: Java Bean Validation (JSR 349)

Lesson: Introduction to Bean Validation

  • Bean Validation
  • Define Constraints on Object Models
  • Core Validation Annotations
  • Validate Objects and Object Graphs
  • Lab: Bean Validation

Lesson: Bean Validation

  • Validate Parameters and Return Values
  • Develop Custom Constraints
  • Lab: Creating Constraints

Course Materials

Each student will receive a Student Guide with course notes, code samples, software tutorials, diagrams and related reference materials and links (as applicable). Our courses also include step by step hands-on lab instructions and and solutions, clearly illustrated for users to complete hands-on work in class, and to revisit to review or refresh skills at any time. Students will also receive the project files (or code, if applicable) and solutions required for the hands-on work.

Classroom Setup Made Simple:  Our dedicated tech team will work with you to ensure your classroom and lab 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 facility.  Please inquire for details, options and pricing.

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.

Mix, Match & Master!
2FOR1: Two Courses, One Price!

Enroll in *any* two public courses (for 2023 *OR* 2024 dates!) by December 31, for one price!  Learn something new, or share the promo!

Click for Details & Additional Offers

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