Releasing in March 2022, the proposed features of Java 18 include a vector API, adopting UTF-8 as the default character set, a simple web server and more.
In a new update for JDK 18, nine new features for the upcoming Java 18 were released.
Upgrades for Java are released every six months with the last upgrade Java 17, released in September.
Java 18 is in the “ramp-down phase one” which means no further changes proposal will be included in the release. Hence the feature set is now frozen.
The following features are officially released on the OpenJDK page: a simple web server, a service provider interface, a vector API, a reimplementation of core reflection, code snippets, a UTF-8 charset, the second preview of pattern matching for switch statements, the second incubator of a foreign function and memory API, and the deprecation of finalization.
The main changes of Java 18 are:
- The default character set for all operating systems will be UTF-8 in the future irrespective of any particular language and locale settings.
- You can quickly start a simple web server using jwebserver command (or the SimpleFileServer class)
- You get a powerful tool, that is,@snippet tag, to integrate the source code snippets into your JavaDoc documentation.
- The “Internet-Address Resolution SPI” feature will allow replacing the standard resolver for IP addresses, which becomes helpful for testings.
- “Pattern Matching for switch”, “Vector API”, and “Foreign Function & Memory API”, these preview and incubator features were each sent for the next incubator or preview round.
- Thread.stop() and finalization has been marked as “deprecated for removal”.
You can download the early access version of JDK 18 here
Consult our team of experts and app developers at Markovate to guide you in digital products and app development using modern up-to-date frameworks and technologies.