Modern Java: Virtual Threads & High-Throughput Services

Project Loom, Structured Concurrency & JVM Performance

8 modules, 40 lessons: Ecosystem And Toolchain; Types, Modern Syntax, And Generics; Collections, Streams, And Optional; Exceptions And Concurrency; JSON And Testing; Spring Boot Fundamentals; Building APIs With Spring Boot; Persistence And Integration Testing.

Intermediate · 2 hours · 40 lessons · 67 labs

Who it is for

Intermediate level.

For developers who know some Java or another object-oriented language and want to build and test a production-ready API with modern Java and Spring Boot.

What you don't need yet:

What helps:

Before you start:

Take first:

Take next:

Learning paths:

Nobody needs to know everything before they start. Each course builds on the one before, so a learning path takes you there step by step.

Labs

67 labs, 23 of them graded: you write the code, it runs, and graded labs check the result. The outline lists each lesson's labs.

What is free

Start free: First module free with an account. Pro: Every course, lab, handbook, practice exam and certificate.

Course outline

Ecosystem And Toolchain

  1. The Virtual Machine, The Kit And The Runtime (3 labs): You can say exactly what the virtual machine, the runtime and the development kit each are, compile and run a program by hand without a build tool, and read the bytecode a class file holds.
  2. Release Trains And Long Term Support (3 labs): You can explain the six month release train, say what long term support actually guarantees, read the version of a running machine, and target an older release from a newer compiler.
  3. The Lifecycle Of A Java Program (4 labs): You can trace a program from source to class file to loaded class to native code, explain when a class is initialised, and use the single file launcher for a quick script.
  4. The Toolchain: Maven (4 labs): You can read a project object model file, name the coordinates of a dependency, run the build lifecycle through the wrapper, and say which phase produced which file under the target directory.
  5. The Toolchain: Gradle (3 labs): You can read a Gradle build script, run its test task through the wrapper, explain what up to date means, and choose between Maven and Gradle for a new service with reasons.

Types, Modern Syntax, And Generics

  1. Primitive And Reference Types (3 labs): You can choose suitable primitive and reference types, explain boxing, and avoid accidental null values at an API boundary.
  2. Generics Fundamentals (3 labs): You can define and use generic classes and methods, read type parameters, and explain why generic collections prevent casts.
  3. Records And Data Classes (3 labs): You can model immutable API data with records and know when a full class is the better choice.
  4. Sealed Types And Exhaustiveness (3 labs): You can constrain an inheritance hierarchy with sealed types and make every permitted case explicit in a switch.
  5. Pattern Matching And Text Blocks (3 labs): You can use pattern matching to narrow values safely and text blocks to keep multi line payloads readable.

Collections, Streams, And Optional

  1. The Collections Framework (2 labs): You can choose lists, sets, and maps by the access and uniqueness guarantees your API needs.
  2. Generics And Collections (2 labs): You can read wildcard collection types and write methods that safely consume or produce generic values.
  3. The Streams API (2 labs): You can build a stream pipeline that filters, transforms, and collects data without mutating its source.
  4. Advanced Stream Operations (2 labs): You can sort, flatten, group, and short circuit stream pipelines while keeping their cost visible.
  5. Handling Nulls With Optional (2 labs): You can use Optional to model a possibly missing result without hiding null checks inside business logic.

Exceptions And Concurrency

  1. Checked Versus Unchecked Exceptions (1 lab): You can distinguish checked and unchecked exceptions and choose a boundary where each failure should be handled.
  2. The Cost Of Checked Exceptions (1 lab): You can assess checked exception costs across layers and translate unstable library failures into stable service errors.
  3. Concurrency Basics: Threads And Runnable (1 lab): You can start a thread safely, describe shared state risks, and join work before returning a result.
  4. The ExecutorService (1 lab): You can submit tasks to an executor, collect futures, and shut the pool down without leaking worker threads.
  5. Async With CompletableFuture (1 lab): You can compose asynchronous stages, combine results, and handle failures with CompletableFuture.

JSON And Testing

  1. Serialization And JSON (1 lab): You can explain serialization, JSON shape, and why wire contracts need explicit models.
  2. Working With Jackson (1 lab): You can configure Jackson for records, read JSON into types, and keep serialization failures at an API boundary.
  3. Testing Basics With JUnit 5 (1 lab): You can structure a JUnit five test around a behavior and read failures as feedback about a contract.
  4. Fluent Assertions With AssertJ (1 lab): You can use AssertJ assertions that describe values, collections, and exceptions in readable failure messages.
  5. Designing Testable Code (1 lab): You can separate side effects from decisions and inject collaborators so unit tests stay fast and focused.

Spring Boot Fundamentals

  1. Dependency Injection And The IoC Container (1 lab): You can explain inversion of control and define constructor injected Spring beans.
  2. Spring Boot Auto Configuration (1 lab): You can describe how Spring Boot selects infrastructure from the classpath and explicit application settings.
  3. Configuration And Profiles (1 lab): You can bind typed configuration and select environment specific profiles without changing application code.
  4. The Spring Bean Lifecycle (1 lab): You can place initialization and cleanup at the correct Spring lifecycle boundary.
  5. Packaging Into A Container (1 lab): You can package a Spring Boot jar with a multi stage container build and run it as a non root process.

Building APIs With Spring Boot

  1. Controllers And Routing (1 lab): You can map HTTP requests to Spring controllers and keep transport code separate from application services.
  2. Reading The Request (1 lab): You can bind path variables, query parameters, headers, and request bodies to typed controller arguments.
  3. Validation (1 lab): You can validate request models with Jakarta constraints and return useful field errors to clients.
  4. Exception Handling To Problem Details (1 lab): You can map application failures to consistent RFC problem detail responses with controller advice.
  5. Implementing An OpenAPI Contract (1 lab): You can implement a documented OpenAPI route with matching models, status codes, and error responses.

Persistence And Integration Testing

  1. Persistence With JPA And Hibernate (1 lab): You can map a domain record to a JPA entity and understand what Hibernate manages for you.
  2. Spring Data Repositories (1 lab): You can define a repository interface, choose query methods deliberately, and keep persistence details out of controllers.
  3. Testing APIs With MockMvc (1 lab): You can exercise Spring MVC routes with MockMvc and assert status, headers, and JSON response fields.
  4. Database Integration With Testcontainers (1 lab): You can run repository tests against a disposable real database and keep schema assumptions visible.
  5. Tying It All Together (1 lab): You can trace an API request through controller, service, repository, database, and tested response.

Certification courses