Modern Java:
- switch expressions
- sealed types
- record classes
- record patterns
- record reconstructors
- value classes
- all values are objects
- universal generics
- concise method bodies
- local-variable type inference
- Markdown documentation comments
Not shown:
- enhanced primitive boxing
- deconstruction patterns and reconstructors for carrier classes and interfaces
- primitive patterns, constant patterns, array patterns, vararg patterns
- member patterns (static, instance, pattern lambdas/references)
- pattern matching in assignment statements, enhanced for-loops, catch blocks, lambda params, method params?
- exception handling in switch
- typeclasses, operator overloading
- serialization v2
- flexible constructor bodies
- module imports
- compact source files
- JShell
- nullable and null-restricted types (opt into null restriction by default per module)
- specialization of generics over primitive and value types
- declaration-site variance
- immutable arrays
- arrays 2.0
- 64-bit hash codes
- stream gatherers
- text blocks
- string templates
- virtual threads
- structured concurrency
- scoped values
- processor locals
- unwind-and-invoke
- continuation API
- Hermetic Java
- lazy constants
- condensers
- AOT cache (class loading/linking, method profiling, code compilation)
- GraalVM native images, web images, layered images
- Project Crema (Ristretto JIT compiler)
- Truffle
- Espresso
- compact object headers
- thread-local, generational ZGC
- automatic heap sizing
- vector API
- foreign memory access
- foreign function calls
- code reflection
- class-file API
- Java Platform Module System
- integrity by default