Package net.jrodolfo.java_evolution.java09
package net.jrodolfo.java_evolution.java09
Examples for features introduced in Java 9.
Java 9 introduced the Java Platform Module System (JPMS) and several practical language and library improvements, including collection factory methods, Optional enhancements, Stream enhancements, private interface methods, Process API updates, StackWalker, and a try-with-resources refinement.
The module system is represented with explanatory examples instead of a real
module-info.java file so the Spring Boot project can remain
intentionally lightweight.
For beginner-oriented notes about the problems these features solved, see the package README in the source directory.
-
ClassDescriptionDemonstrates collection factory methods introduced in Java 9.Explains the Java Platform Module System (JPMS), introduced in Java 9.Demonstrates
Optionalmethods added in Java 9.Demonstrates private methods in interfaces, introduced in Java 9.Empty implementation that receives behavior from interface default methods.Interface with default methods that share private helper logic.Demonstrates Process API updates introduced in Java 9.Small Java 9-style data class for process metadata.DemonstratesStackWalker, introduced in Java 9.Demonstrates Stream API enhancements introduced in Java 9.Demonstrates the Java 9 try-with-resources improvement.