JDK 12 includes several new features and improvements including:
- Adding a microbenchmark suite to easily run and create microbenchmarks (JEP 230)
- Introducing an API to model loadable constants to simplify bytecode manipulation (JEP 334)
- Extending the switch statement to be used as either a statement or expression (JEP 325)
- Automatically generating a default class data sharing archive to improve startup times (JEP 341)
- Making mixed collections in G1 abortable if pause targets are exceeded (JEP 344) and promptly returning unused Java heap memory (JEP 346)
- Adding Shenandoah, a low-pause garbage collector that performs evacuation concurrently (JEP 189