Introduction – Java is the most common or trending programming language and was created in the year 1995. It can be used in developing web apps, games, mobile apps, desktop apps, and many more. This programming language is owned by Oracle with more than 3 billion devices to run Java.

Now, Oracle has introduced the Java Development Kit (JDK) 21 which can be accessed from Oracle.com. Oracle will support Java Development Kit (JDK) 21 for about 8 years and also declared that the long-term support for Java 11 which was introduced 5 years ago has been extended through January 2032.
New features of Java 21 – There are several new features of Java 21 are given below –
- Java Development Kit 21 offers a new ‘’String Template’’ feature in which Java has launched a new way of using the string in other words and also allows users to mix the code and expression together.
- This programming language also allows users to break down or deconstruct complex data which is known as record.
- Java Development Kit 21 has launched virtual threads for users to do tasks faster without assigning much space and resources to the memory.
- Java Development Kit 21 has launched an API (Application Programming Interface) for key encapsulation mechanisms (KEM) that helps to store secret keys securely and safely.
- Java 21 also provides vector tools and API that will help users to get the fastest performance in many tasks including scientific calculations or graphics rendering.
- The company has introduced the new feature of Z Garbage Collection (ZBC) in the Java that works or performs all the expensive works simultaneously without stopping the execution of application threads and also cleans the unused memory.
- It also has enhanced its several tools including ‘’ProcessBuilder’’ and ‘’Runtime. exec’’ which can be used for starting new processes just like running a new program.
- It has also launched the method in the ‘’java. lang. Character’’ class for working with several types of emoji’s properties.
- Java Development Kit 21 (JDK 21) has also added some methods in the latest version such as the close () method that waits for any ongoing or continuing requests to complete before closing. When tasks have been done then it easily closes the HTTP client.
- Java 21 also provides the latest interfaces to the Java Collections framework that is enhancing the collection framework and offering the clear or right sequence order.