
Explore the evolution of Java from nine to seventeen, focusing on productivity, memory footprint improvements, faster startup, and tools that enhance performance and reliability.
Explore Java releases from nine to seventeen, including the module system, local variable type inference, text blocks, switch expressions, sealed classes, and migration tools, with practical examples and exercises.
Students will get an understanding of the Java release schedule. There are a few changes recently announced, which we will look at in another lecture.
1. The java_catching_up zip file contains source code that we will refer to throughout the course.
2. The modules_movieflix.zip and multi_modules.zip contain source code that we will refer to when we discuss modules, this is in the next section when we explore Java 9.
3. The JMH_Demo.zip contains source code that we will look at in Section 5 when we explore Java 12 and the concept of JMH.
Explore how the G1 collector partitions the heap into eden, survivor, and old regions, evacuating eden via young collections and triggering a concurrent mark cycle at 45%.
Declare module dependencies with requires to access other modules, such as java.logging, and export packages to enable the movie recommendation controller to log messages at runtime.
Learn why automatic modules matter when migrating from jar files to modules, enabling explicit dependencies via module path and allowing automatic modules to read all modules and export packages.
Understand how Java 9 modularization encapsulates internal APIs, causing access barriers to sun.security.x509, and use the Java Dependency Analysis Tool to surface internal dependencies and replace with standard APIs.
Learn how Jlink, the Java linker, builds a tailored runtime image containing only the modules your application needs, reducing size and improving startup time.
Learn to use jlink to build a custom runtime image for a modular application with a single module, including only the required modules.
Learn to use jlink to build a custom runtime image that includes two modules, managing module path and dependencies from a mods folder and producing a lean, runnable application.
Explore jshell, the read-evaluate-print loop bundled with the JDK since Java 9, for interactive Java snippets. Prototype and get immediate feedback, since jshell is not an IDE.
Explore how private methods in interfaces, introduced in Java 9, reduce duplication by refactoring common logic from default methods, while preserving interface evolution and encapsulation.
Explore Java 9 stream iterate overload with a predicate to produce and terminate streams using seed, predicate, and unary operator, and learn takewhile with primitive streams.
This lecture includes a downloadable PDF guide that introduces the Flow API, a powerful feature added in Java 9 to support reactive programming.
What you’ll find inside:
- A clear explanation of the Flow API and why it was introduced
- The four core interfaces: Publisher, Subscriber, Subscription, and Processor
- Practical examples using `SubmissionPublisher`
- How the Flow API connects with libraries like RxJava and Project Reactor
- Key takeaways to help you build a strong foundation for modern Java development
Even though you may not use the Flow API directly in day-to-day coding, it provides the foundation for many reactive libraries and frameworks.
Download this PDF and keep it as a handy reference — it will strengthen your understanding of Java’s evolution and help you in both learning and interviews.
Explore local variable type inference and the or else throw method in optional. Learn to create unmodifiable collections and enable application class data sharing to improve startup time on docker.
Harness local variable type inference with var to simplify a stream-based approach that groups by movie name, finds the most watched movie, and refactors for readability.
Investigate how the JVM now recognizes Docker container constraints via cgroup settings to adjust heap and memory usage, with backport fixes to Java 8 update 191.
Explore Java 11 features, including the Http client with Http2 and WebSocket non-blocking semantics, local variable syntax for lambda parameters, and new string methods like repeat, isBlank, strip, and lines.
Explore the Java http client API introduced in JDK 11 and compare it with the legacy HTTP URL connection, highlighting its fluent, asynchronous design with HTTP/2 and reactive streams integration.
Discover how the string API repeat method in JDK 11 repeats a string n times and returns an empty string for zero, using a byte array and System.arraycopy.
Learn how the strip method handles unicode whitespace in java, using character.isWhitespace, and compare it with strip trailing, strip leading, and the traditional trim behavior.
Understand how JDK 11 removes Java EE modules such as Jax-ws, JAXB, and Corba, and what this means for migrating apps that rely on these APIs.
Analyze deprecation of JavaFX and OpenJFX as an open-source project, while Java is no longer bundled in JDK 11+ and modules are fetched via Maven Central with Maven or Gradle.
Explore the readString and writeString methods in the files class (JDK 11) to read a file into a string and write string content.
Learn how to use the JDK mission control user interface to connect to a Java program, view live statistics, and diagnose a deadlocked multithread scenario.
Start a flight recording with java -X:StartFlightRecording, dump on exit, or jfr start with the pid, then stop to dump, and view thread dumps and deadlock in Mission Control UI.
Learn how the teeing collector merges two downstream collectors to process a stream in parallel, using joining and counting to produce a sentence and its total word count.
Shenandoah, introduced in Java 12, reduces GC pause times by evacuating concurrently. It uses a forwarding pointer, or brooks pointer, to relocate objects without stopping the program.
Use the string class transform method to drop the first word, uppercase each remaining word’s first letter, and append three dots. Compare two solutions and highlight a fluent, functional approach.
Apply the translate escapes method to convert escape sequences in external file lines into proper strings, then group non-blank lines by length and present translated results.
Explore switch expressions and their evolution from JDK 12 preview to JDK 14 permanent feature, noting the yield keyword introduced in JDK 13 and switch as an expression.
Explore Java 14 features like switch expressions and helpful null pointer exceptions, and review changes in garbage collection. Learn about records for concise data declarations and pattern matching.
Explore text blocks in Java and learn two escape sequences: the line terminator to suppress a newline and the explicit space escape sequence to preserve trailing spaces.
See how a local record, defined inside a method, aggregates a movie and its score to produce the top three via a stream pipeline.
Examine how sealed classes constrain extensibility by listing permitted subclasses, with examples like payment, cash payment, and card payment, and contrast sealed, non-sealed, and final modifiers for secure, well-typed hierarchies.
Explains how to use the stream flatMap to extract the cast from Martin Scorsese movies, showing a one-to-many transformation and flattening into a single list, contrasting with map.
Refactor mapMulti by explicit types or a consumer, using a method reference for getStar. Use toList in JDK 16 to yield an unmodifiable list rather than collect.
Delve into pattern matching for instanceof, the type pattern feature now permanent in Java 16, and refactor code to bind values with a pattern variable while eliminating casting boilerplate.
Design an expression system with sealed types and records, using constant, add, multiply, and negate to implement evaluate logic.
Learn how jpackage packages self-contained Java applications, bundling jars with the runtime to produce installable bundles (MSI, DMG, deb, rpm) for Windows, macOS, and Linux, with no cross-platform deployment.
Explore JDK 17, a long-term support release, highlighting strong encapsulation of internal APIs and new classes, interfaces, and enums. Discover pattern matching for switch, yielding concise case labels.
Explain how sealed classes let you control permitted subtypes, enabling secure hierarchies and accurate domain modeling while highlighting compile-time checks on conversions.
Explore the removals and deprecations in Java 17, including the legacy security manager deprecated for removal, the applet API deprecated for removal, and the removal of the RMI activation mechanism.
Java has changed more since Java 9 than at any time in its history. From modules and `var` to records, sealed classes, text blocks, and switch expressions — the language is evolving fast, and keeping up can be a challenge.
This course gives you a step-by-step path from Java 9 through Java 17, making it simple to catch up with all the modern features while building confidence through hands-on exercises.
By the end of this course, you will:
Understand how Java has evolved beyond Java 8
Master new language features like modules, var, records, sealed classes, text blocks, and switch expressions
Explore new garbage collectors, library enhancements, tools, and deprecations
Learn how the new JDK release cycle impacts developers
Gain confidence with practical exercises and solutions
Be better prepared for interviews and real-world projects
Starting from Java 9, we will incrementally move up to Java 17 and explore :
Language Features, Garbage Collectors, Library enhancements, Tools, Removals and Deprecations, and a lot more.
We target a single Java release in every section.
Some of the topics covered -
Text Blocks, Switch Expressions, Records, Pattern Matching for instanceof, Pattern Matching for switch, Sealed Classes
Garbage Collectors - G1, Epsilon, ZGC, Shenandoah
Modularity, jdeps, jlink, jdeprscan
Improved Docker Container Detection
Tool/Toolkit - Jpackage, JShell, JDK Flight Recorder
Factory methods in Collections
Compact Strings
Understand how String concatenation works behind the scenes
Some of the changes in the Stream API
Local Variable Type Inference along with recommendations on usage
Application Class Data Sharing
The new HTTP Client API
Handy String API changes
Writing scripts using the Java programming language
Teeing Collector
JMH (Java Microbenchmark Harness)
Encapsulated JDK internals
Tips on Migration (Examples on JAXB, Hibernate, and Spring Boot)
and more!
Now includes a downloadable PDF guide on the Java Flow API (Java 9+) — a beginner-friendly reference that explains the core reactive programming interfaces with clear examples and key takeaways. This bonus resource strengthens your understanding and helps with interview preparation.
The course will immensely benefit Java developers interested in getting up to speed with the ever-evolving Java language.
There are lots of exercises (along with the solution) that will help you to gain confidence.
The course is not a migration guide but we do cover numerous areas that can have an impact on migration.
What if you have questions?
I offer full support, 7 days a week, answering any questions you have.