Skip to main content

Instructor-led training

Java 8 New Features Training in Searcy, Arkansas

Private Java Programming training for organizations from Hartmann Software Group, delivered onsite in Searcy, Arkansas or live online.

What you'll learn

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.
 
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, including chaining operations and using collectors
- Understand and use parallel streams
- Understand and deal with the issues of parallel processing
- Learn and use the new Data/Time API
- Be familiar with other new capabilities

Private Training for Teams

This course is offered as private, instructor-led training for organizations, onsite in Searcy, Arkansas or live online. Dates, delivery format, and course content are arranged around your team's requirements.

This course is not currently scheduled as a public class for individual enrollment.

Request Group Training

Prerequisites

No programming experience necessary

Course Outline

1: What's new in Interfaces
Static Methods
Default Methods
Functional Interfaces
 
2: Introducing Lambda Expressions
Motivation for Lambdas
Lambda Expression Overview
Lambda Expressions and Functional Interfaces
Using Lambda Expressions
Working with Method References
 
3: The Stream API
Overview
Shortcomings of Collections
What are Streams?
Chaining - Intermediate and Terminal Operations
- Understanding the Stream API
Overview - java.util.stream types (Stream, Collector, ...)
Keys to Understanding the API
Important Functional Interfaces: Predicate, Comparator, Function
- Stream Processing
Using filter()
Sorting / Comparator.comparing()
Using map()
Other operations: peek(), distinct(), limit(), skip()
Result producing terminal operations - collect, min/max ...
void Terminal Operations - forEach()
Existence (e.g. anyMatch) and Finder (e.g. findAny) Operations
- Collectors
Roles and Capabilities
Collectors.toList(), Collectors.toSet()
Supplier and Collectors.toCollection()
Partitioning and Grouping Collectors
 
4: Parallel Processing and Concurrency
li>Overview
Java 8 Parallel Processing using Streams
Ground Rules / Requirements for Using Parallel Stream Processing
Multithreading / Concurrency Issues
Race Conditions, Data Synchronization, Locks
Performance Issues and Considerations
 
5: Date/Time API
Overview and Limitations of Previous API
The Date/Time API (JSR 310)
Creating and Working with LocalData/LocalTime/LocalDateTime Instances
Formatting Date/Time
Localization / Time Zones
Periods and Durations
Performing Calculations on Data/Time types
 
6: Other Capabilities
Compact Profiles
Using Optional Instead of null
Repeatable and Type Annotations
Nashorn JavaScript Engine
Minor New Features

What makes Java 8's new features hard to master

The syntax is small. The difficulty is a change in how you express work: you pass behavior into methods instead of writing loops. The syllabus builds in a deliberate order.

  • Interfaces first. Static and default methods, then functional interfaces. A lambda expression only makes sense once you see that it supplies the single abstract method of a functional interface.
  • Lambdas and method references. The course covers the motivation, how a lambda maps to a functional interface, and when a method reference replaces a lambda.
  • The Stream API. Learners often treat a stream as a collection. The course starts with the shortcomings of collections and the difference between intermediate and terminal operations. Nothing runs until a terminal operation is called. It then covers filter(), map(), Comparator.comparing(), peek(), distinct(), limit() and skip(), and finder and match operations. Collectors such as toList(), toCollection(), partitioning and grouping come last.
  • Parallel streams. A common misconception is that adding a parallel stream makes code faster. The course covers the ground rules for using one, race conditions, synchronization and locks, and performance considerations.
  • Date/Time API (JSR 310). The course covers local date and time types, formatting, time zones, periods versus durations, and date arithmetic. Mixing up periods and durations or zones is a frequent source of errors.

The final module covers Optional as an alternative to null, repeatable and type annotations, compact profiles, the Nashorn JavaScript engine and minor features.

Who it suits and what to take around it

This is a two-day, hands-on course for developers who already write Java. The description expects intermediate skill, including comfort with interfaces. It suits teams that maintain or extend systems on Java SE 8, which Oracle lists as being in Extended Support until December 2030, and teams moving older Java code toward lambdas and streams.

If your Java foundation is thin, start with Fast Track to Java 8 and OO Development. It covers the object-oriented basics that the interface and lambda material builds on. For language topics beyond this course, Advanced Java Language Topics is a natural next step. Other options are listed in the Java Programming courses and learning guide.

Organizations on a newer Java release can request a training proposal. Private training can be tailored to the versions a team uses, delivered onsite or live online.

Illustrative scenarios

The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.

  • Reporting on collections. A team might replace nested loops that filter, sort and total order records with a stream pipeline. It would use filter(), Comparator.comparing() and map(), then groupingBy or partitioningBy collectors to produce summaries.
  • Speeding up a batch calculation. A developer might try a parallel stream on a CPU-heavy transformation. The parallel-processing module's topics apply directly: whether the work is independent, whether shared mutable state creates race conditions, and whether the overhead pays off.
  • Scheduling logic. A team might replace legacy date handling with LocalDateTime, time zones, periods and durations. For example, it might calculate the time between two events or format dates for display in different locales.

AI coding assistants with Java 8 features

AI coding assistants are useful for converting a simple loop into a stream, suggesting a method reference in place of a lambda, and drafting unit tests. They are weaker in the areas this course stresses.

  • Parallel streams. An assistant may add parallel() or accumulate into a shared list without recognizing the race condition. Compare sequential and parallel results over repeated runs, and measure before keeping parallel().
  • Collectors. Grouping and partitioning produce nested map types that are easy to get subtly wrong. Test with small data sets that include empty and duplicate cases.
  • Date/Time. Generated code often ignores time zones or confuses Period with Duration. Test around daylight-saving changes and month ends.
  • Version drift. Suggestions may use APIs or syntax from later Java releases than the project targets. Compile against the project's actual Java version.

Understanding evaluation order, functional interfaces and thread safety lets you review generated code instead of trusting it.

Frequently asked questions

What level is this course?

It is a general-level, two-day course for working Java developers. The description expects intermediate Java skills, including interfaces.

What should I know beforehand?

You should be comfortable writing general Java code and using interfaces. Without that, consider Fast Track to Java 8 and OO Development first.

What does the course cover?

It covers interface static and default methods, functional interfaces, lambda expressions and method references, the Stream API with collectors, parallel streams and concurrency issues, and the Date/Time API. It also covers Optional, annotation enhancements, compact profiles and Nashorn.

Can this be delivered privately for our team?

Yes. HSG delivers private training onsite at the client's location or live online, and content can be customized for your team.

Can the content be adapted to a newer Java version?

Private training can be tailored to the versions an organization uses, including current releases. You can request a training proposal to discuss your needs.

Training locations

Java 8 New Features training across the U.S. and beyond.

We provide private Java 8 New Features training for organizations, onsite at your location or live online, throughout the United States and internationally.

View all Java 8 New Features training locations

Train your team with HSG

Private, instructor-led training customized for your organization.

  • Onsite or live online delivery
  • Customized curriculum
  • For a single employee or an entire team
  • Flexible scheduling
  • Experienced instructors
Request Group Training

Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com

Ready to train your team?

Let's customize this training for your organization.

Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.