Feature | Description | JSR/JEP | Released in |
---|---|---|---|
UTF-8 by Default | Sets UTF-8 as the default charset for the Java API, ensuring consistent behaviour regardless of environment. | JEP 400 | Java SE 18 |
Simple Web Server | A CLI tool for running a basic web server for prototyping and learning environments. | JEP 408 | Java SE 18 |
Sequenced Collections | Introduces collections that maintain elements in a specific, predictable order, enhancing data handling. | JEP 431 | Java SE 21 |
Generational ZGC | Improves Z Garbage Collector for better performance in heap management by implementing generational collection techniques. | JEP 439 | Java SE 21 |
Record Patterns | Extends pattern matching to records, allowing for concise and safe deconstruction of records. Introduced in JEP 405 (Java SE 19). | JEP 440 | Java SE 21 |
Pattern Matching for switch | Extends pattern matching capabilities to switch expressions, simplifying complex chain of conditions. Introduced in JEP 406 (Java SE 17). | JEP 441 | Java SE 21 |
Virtual Threads | Introduces lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications. Introduced in JEP 425 (Java SE 19). | JEP 444 | Java SE 21 |
Key Encapsulation Mechanism API | Provides a new API to support modern cryptographic algorithms for encapsulating keys, enhancing security. | JEP 452 | Java SE 21 |
Java SE 21 introduced several tools and utilities aimed at enhancing developer productivity and simplifying the development process.
This category includes fundamental changes and updates to the Java programming language, enhancing readability and reducing boilerplate code.
switch
expressions, simplifying complex chains of conditions (JEP 441).Enhancements and additions to the Java standard API, providing new capabilities and simplifying common tasks.
Updates and improvements to the JVM and garbage collection, focusing on performance, security, and robustness.