Java18 is the latest new version released by oracle in March 2022.

It is also called Java SE Platform with Version 18.

Java18 Features

  • Scoped Values(JEP 429 )
  • Record Pattern (JEP 432 )
  • Pattern Matching for Switch Statements and Expressions(JEP 433)
  • Memory API and Foreign Functions
  • Virtual Thread
  • Vector API
  • primitive classes

Deprecated features

  • java.net.URL constructors are deprecated

The following URL version constructors removed in this version

URL(String, String, int, String)
URL(String, String, String)
URL(String, String, int, String, URLStreamHandler)
URL(String} m a URL(URL, String)
URL(URL, String, URLStreamHandler)
  • Thread.suspend/resume not supported, throws UnsupportedOperationException
  • javax.management.loading classes deprecated
  • Support Unicode 15.0:

Unicode 15 is the latest version released in Sep 2022 with 31 Emojis, 4,489 new characters, for a total of 149,186 characters.

Now, Java.lang.Character class supports all new characters released with this version.

Minimal feature enhancements:

  • JMod command line option –compress jmod tool introduced in Java9 version.
  • compress option to JMod tool allow you create, read update JMOD archive files.
  • Auto Generate unique id for Java documentation
  • SSL Named Groups Introduced

javax.net.ssl introduced getNamedGroups and setNamedGroups to set and get named groups of keys for TLS connections.

public String[] getNamedGroups()
public void setNamedGroups(String[] namedGroups)
  • Lint option for javac compiler java compiler introduced option lossy-conversions warning to find out loss of data during data casting on complex assignment. This can be avoided using @SuppressWarnings("lossy-conversions") annotation

  • If Bad java.io.tmpdir Setting Is Detected New Warning is printed JDK-8290313

java.io.tmpdir is empty and does not exists, New warning is printed to Standard error stream “WARNING: java.io.tmpdir directory does not exist”

  • Add GarbageCollectorMXBean for Remark and Cleanup Pause Time in G1 (JDK-8297247)
  • Unicode CLDR version 42

What is the latest version of Java 20?

java 20 or jdk20 is the latest version released in March 2022.

You can download it from here

What is java 20 Release Date?

Java 20 is latest java version released in March 2022, Comes with incremental additional features and enhanced existing features.

How to Check Java latest version

Release notes