Download a PDF of this article
Earlier in 2022, Java Magazine published seven articles by Bruce Eckel (author of On Java 8 version 2) that describe new features added to the Java language since Java 8, covering everything through Java 17. Readers requested a list of the topics covered in those seven articles; here’s the list.
Note that all the source code for these articles can be found on GitHub.
The var
keyword
Type inference
Generics
The record
keyword
Canonical constructors
Compact constructors
The default
and static
methods
Sealed classes
Sealed interfaces
Subclasses of a sealed
class
The arrow syntax (->
) in case
clauses in a switch
The case null
clause in a switch
Using switch
as an expression
Pattern matching for instanceof
The bigger picture of pattern matching
Selector expressions
Guards
Dominance
Coverage
Modules
Text blocks
Better NullPointerException
reporting
Effectively final
variables in try-with-resources
Alan Zeichick is editor in chief of Java Magazine and editor at large of Oracle’s Content Central group. A former mainframe software developer and technology analyst, Alan has previously been the editor of AI Expert, Network Magazine, Software Development Times, Eclipse Review, and Software Test & Performance. Follow him on Twitter @zeichick.
Previous Post