March 20, Oracle announces that Java 10 is officially released.
Official downloads available: http://www.oracle.com/technetwork/java/javase/downloads/index.html.
After Java 9, Java adopted a time-based release strategy, one version per 6 months. This is the first version that follows the new release strategy.
Java 10 has a major 12 new features.
specifically to see.
JEP 286:local-variable Type Inference
Type deduction for local variables.
A lot of people are going to throw up. Java code is too cumbersome to write, especially when it comes to generics. Like C + +, the Type deduction feature is also introduced based on the Auto keyword.
Java also plans to introduce similar features, such as the syntax:
var list = new ArrayList<String>(); // infers ArrayList<String>var stream = list.stream(); // infers Stream<String>
This feature can only be used in three scenarios:
Local variables with initialization information
To enhance an index in a for loop
Local variables in the traditional for loop
Take a look at some of the more complicated examples:
Readers interested in this feature can refer to: https://developer.oracle.com/java/jdk-10-local-variable-type-inference.
JEP 296:consolidate the JDK Forest into a single Repository
Merge multiple code warehouses for the JDK into one code warehouse.
The JDK code should know that the different functions of the JDK are distributed in different code warehouses. In JDK 9, for example, there are 8 code warehouses: root, CORBA, Hotspot,jaxp, Jaxws, JDK, Langtools, and Nashorn. The hotspot is the virtual machine implementation code, the JDK is the Java class library and related tools, Langtools is javac and other tools, Nashorn is the JavaScript engine.
JEP 304:garbage Collector Interface
The garbage collector interface.
In the HOTSPOT/GC code implementation, a clean garbage collector interface is introduced to improve the isolation of different garbage collector source code. This will make it easier to add new or delete old GC.
JEP 307:parallel full GC for G1
Introduce a parallel full GC for the G1 garbage collector.
JEP 310:application class-data Sharing
Java has introduced the class data sharing (CDS) to reduce the startup time of Java programs and reduce memory consumption. In short, the Java installer translates the core classes in Rt.jar into internal representations and dumps them into a shared file (shared archive). More than one Java process (or JVM instance) can share this part of the data.
Now, hopefully, a step closer to supporting the application class's data sharing.
JEP 312:thread-local Handshakes
Modify the security point mechanism so that part of the callback operation only needs to stop a single thread, not as before, can only select or stop all threads, or do not stop.
JEP 313:remove the Native-header Generation Tool (Javah)
Remove the Javah tool.
Starting with JDK 8, Javah's functionality has been integrated into the javac. So, Javah can be erased.
JEP 314:additional Unicode Language-tag Extensions
Additional Unicode language label extensions.
Enhanced Java.util.Locale and related APIs to implement additional Unicode extensions in the BCP 47 language tag.
JEP 316:heap Allocation on alternative Memory Devices
Allocates heap memory on an optional memory device.
Supports allocating the Java object heap to memory devices such as NV-DIMM. As NV-DIMM becomes cheaper, future systems may be equipped with heterogeneous memory architectures.
JEP 317:experimental java-based JIT Compiler
An experimental Java-based JIT compiler.
Supports the Java-based JIT compiler. Related work is mainly based on Graal. Graal is also the basis for the AOT compiler introduced in Java 9.
JEP 319:root Certificates
Root certificate.
Provides a default set of root certificates in the JDK.
JEP 322:time-based Release Versioning
The time-based version string. Modifies the Java SE platform and JDK version string mechanism. Considering issues such as compatibility with previous version numbers, the new version naming mechanism is: $FEATURE. $INTERIM. $UPDATE. $PATCH
$FEATURE, each version is released plus 1, regardless of the specific version content. (Previous major version number section) March 2018 version is JDK 10, September version is JDK 11, and so on.
$INTERIM, the intermediate version number, released in the middle of a large version, contains bug fixes and enhanced versions, and does not introduce non-compatibility modifications.
As of this, Java 10 is officially released!