# Highlights of the Newest and Latest JEPs in Java 16

> The JDK Enhancement Proposal (or JEP) is a community process for proposals for enhancements to the OpenJDK. Which ones made it into Java 16?

- URL: https://foojay.io/today/highlights-of-new-jeps-in-java-16/
- Published: 2021-03-16
- Authors: Geertjan Wielenga
- Categories: Records, Sealed Classes


The JDK Enhancement Proposal (or JEP) is a community process for collecting proposals for enhancements to the OpenJDK.

Java 16, released today, incorporates the JEPs below:

|         |                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|---------|----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **JEP** | **Name**                                                                               | **Summary**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 338     | [**Vector API (Incubator)**](https://openjdk.java.net/jeps/338)                        | Provide an initial iteration of an [incubator module](https://openjdk.java.net/jeps/11), `jdk.incubator.vector`, to express vector computations that reliably compile at runtime to optimal vector hardware instructions on supported CPU architectures and thus achieve superior performance to equivalent scalar computations.                                                                                                                                                                                                                                                             |
| 347     | [**Enable C++14 Language Features**](https://openjdk.java.net/jeps/347)                | Allow the use of C++14 language features in JDK C++ source code, and give specific guidance about which of those features may be used in HotSpot code.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 357     | [**Migrate from Mercurial to Git**](https://openjdk.java.net/jeps/357)                 | Migrate the OpenJDK Community's source code repositories from Mercurial (hg) to Git.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 369     | [**Migrate to GitHub**](https://openjdk.java.net/jeps/369)                             | Host the OpenJDK Community's Git repositories on [GitHub](https://www.github.com/). In concert with [JEP 357 (Migrate from Mercurial to Git)](https://openjdk.java.net/jeps/357), this would migrate all single-repository OpenJDK Projects to GitHub, including both [JDK feature releases](https://openjdk.java.net/projects/jdk/) and [JDK update releases](https://openjdk.java.net/projects/jdk-updates/) for versions 11 and later.                                                                                                                                                    |
| 376     | [**Concurrent Thread-Stack Processing**](https://openjdk.java.net/jeps/376)            | Move ZGC thread-stack processing from safepoints to a concurrent phase.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 380     | [**Unix-Domain Socket Channels**](https://openjdk.java.net/jeps/380)                   | Add Unix-domain (`AF_UNIX`) socket support to the [socket channel](https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/nio/channels/SocketChannel.html) and [server-socket channel](https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/nio/channels/ServerSocketChannel.html) APIs in the `java.nio.channels` package. Extend the [inherited channel mechanism](https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/nio/channels/spi/SelectorProvider.html#inheritedChannel()) to support Unix-domain socket channels and server socket channels. |
| 386     | [**Alpine Linux Port**](https://openjdk.java.net/jeps/386)                             | Port the JDK to Alpine Linux, and to other Linux distributions that use musl as their primary C library, on both the x64 and AArch64 architectures,                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 387     | [**Elastic Metaspace**](https://openjdk.java.net/jeps/387)                             | Return unused HotSpot class-metadata (i.e., *metaspace*) memory to the operating system more promptly, reduce metaspace footprint, and simplify the metaspace code in order to reduce maintenance costs.                                                                                                                                                                                                                                                                                                                                                                                     |
| 388     | [**Windows/AArch64 Port**](https://openjdk.java.net/jeps/388)                          | Port the JDK to Windows/AArch64.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| 389     | [**Foreign Linker API (Incubator)**](https://openjdk.java.net/jeps/389)                | Introduce an API that offers statically-typed, pure-Java access to native code. This API, together with the Foreign-Memory API ([JEP 393](https://openjdk.java.net/jeps/393)), will considerably simplify the otherwise error-prone process of binding to a native library.                                                                                                                                                                                                                                                                                                                  |
| 390     | [**Warnings for Value-Based Classes**](https://openjdk.java.net/jeps/390)              | Designate the primitive wrapper classes as *value-based* and deprecate their constructors for removal, prompting new deprecation warnings. Provide warnings about improper attempts to synchronize on instances of any value-based classes in the Java Platform.                                                                                                                                                                                                                                                                                                                             |
| 392     | [**Packaging Tool**](https://openjdk.java.net/jeps/392)                                | Provide the `jpackage` tool, for packaging self-contained Java applications.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 393     | [**Foreign-Memory Access API (Third Incubator)**](https://openjdk.java.net/jeps/393)   | Introduce an API to allow Java programs to safely and efficiently access foreign memory outside of the Java heap.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| 394     | [**Pattern Matching for instanceof**](https://openjdk.java.net/jeps/394)               | Enhance the Java programming language with *pattern matching* for the`instanceof` operator. [Pattern matching](https://cr.openjdk.java.net/~briangoetz/amber/pattern-match.html) allows common logic in a program, namely the conditional extraction of components from objects, to be expressed more concisely and safely.                                                                                                                                                                                                                                                                  |
| 395     | [**Records**](https://openjdk.java.net/jeps/395)                                       | Enhance the Java programming language with [records](https://cr.openjdk.java.net/~briangoetz/amber/datum.html), which are classes that act as transparent carriers for immutable data. Records can be thought of as *nominal tuples*.                                                                                                                                                                                                                                                                                                                                                        |
| 396     | [**Strongly Encapsulate JDK Internals by Default**](https://openjdk.java.net/jeps/396) | Strongly encapsulate all internal elements of the JDK by default, except for [critical internal APIs](https://openjdk.java.net/jeps/260#Description) such as `sun.misc.Unsafe`. Allow end users to choose the relaxed strong encapsulation that has been the default since JDK 9.                                                                                                                                                                                                                                                                                                            |
| 397     | [**Sealed Classes (Second Preview)**](https://openjdk.java.net/jeps/397)               | Enhance the Java programming language with [sealed classes and interfaces](https://cr.openjdk.java.net/~briangoetz/amber/datum.html). Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them.                                                                                                                                                                                                                                                                                                                                                 |

**Tip:** For a full list of fixes in Java 16, [see the JDK 16 release notes](https://www.oracle.com/java/technologies/javase/16-relnote-issues.html).

