As part of Java Development Kit (JDK) 17, the Java 17 proposal would provide new interface types for PRNGs including jumpable PRNGs and implementations of an additional class of splittable PRNG algorithms (LXM).
The new interface, dubbed RandomGenerator, would provide a uniform API for all new and existing PRNGs.
What's the goal of the enhanced Pseudo-random number generators?
The goal is to focus on multiple areas of improvement in the plan of pseudo-random number generation in Java, which effort doesn't necessarily call for implementations of numerous other PRNG algorithms.
With four specialized RandomGenerator interfaces to be provided, the overriding goals of the plan include:
- Eliminating code duplication in existing PRNG classes
- Providing streams of PRNG objects with improved support for stream-based programming
- Using various PRNG algorithms interchangeably in applications with ease
Furthermore, there is the preservation of existing behavior of class java.util.Random, albeit, three common algorithms have also been added that are already widely deployed in other programming language environments.
What features to Expect in JDK 17?
The main features proposed for JDK 17 include foreign linker API and a foreign-memory access API, with a vector API, which are currently in incubator stage in the JDK 16. Also, in second preview in JDK 16 is Sealed classes, which could become generally available in JDK 17.
If you are a developer and want an early-access open source builds of JDK 17, you can get it at jdk.java.net. But note that JDK 17 is not due until September, and as the next long-term-support (LTS) release, it would receive several years of support. Other Java releases will serve as feature releases, and supported for only six months.