Java 10 Features (AKA Java 18.3 Features)



Features in Java 18.3 (Java 10)
  • Local-Variable Type Inference
  • Consolidate the JDK Forest into a Single Repository
  • Garbage-Collector Interface
  • Parallel Full GC for G1
  • Application Class-Data Sharing
  • Thread-Local Handshakes
  • Remove the Native-Header Generation Tool (javah)
  • Additional Unicode Language-Tag Extensions
  • Heap Allocation on Alternative Memory Devices
  • Experimental Java-Based JIT Compiler
  • Root Certificates
  • Time-Based Release Versioning


What is Type Inference?
Type inference refers to the automatic detection of the data type of an expression in a programming language. It is a feature present in some strongly statically typed languages.

Local Variable Type Inference :


The proposal is to introduce Local Variable Type Inference, a feature that exists in many other languages today. With this new proposed feature we could write code like:

var list = new ArrayList(); // infers ArrayList
var stream = list.stream(); // infers Stream
According to the proposal, the local variable will be inferred to its most specific type. So, in the example above, the variable list will be of type ArrayList and not just List or Collection. This makes sense, and if we want to demote our objects, we simply have to declare them as we always did.


Consolidate the JDK Forest into a Single Repository


Combine the numerous repositories of the JDK forest into a single repository in order to simplify and streamline development.




OpenJDK was split into multiple different Mercurial repositories (usually referred to as Hg repositories) that contained the main components of the platform, namely:
root
corba
hotspot
jaxp
jaxws
jdk
langtools
nashorn

This created several problems, including the inability to apply bug fixes across repositories in an atomic manner. After the consolidation has completed, there will be only one repository replicated in three lines of development:
jdk10/master: for main development work
jdk10/client: integration line for client code (typically desktop)
jdk10/hs: integration line for HotSpot



Garbage Collector Interface
A clean garbage collector interface to improve source-code isolation of different garbage collectors. The goals for this effort include better modularity for internal garbage collection code in the HotSpot virtual machine and making it easier to add a new garbage collector to HotSpot.


The GC interface would be defined by the existing class CollectedHeap which every garbage collector needs to implement.



Parallel Full GC for G1

Parallel full garbage collection for the G1 garbage collector. The intent is to improve worst-case latencies by implementing parallelism.






What is the memory footprint of the JVM
From JVM point of view Java application footprint is roughly the amount of space occupied by Java objects (Heap) and Java classes (Non-heap).



Application Class-Data Sharing
Application class-data sharing to reduce the footprint by sharing common class metadata across processes. Startup time is improved as well.






What is callback?

A callback is nothing more than a user-defined function that should be called whenever a special condition is met.




What is HotSpot in Java?

JVM is an abstract machine (specifications). HotSpot, OpenJDK and JRockit and so are implementations of JVM. HotSpot is an implementation of the JVM concept, originally developed by Sun and now owned by Oracle.




What is safepoint?

In HotSpot JVM Stop-the-World pause mechanism is called safepoint. During safepoint all threads running java code are suspended.



Thread-Local Handshakes
Thread-local handshakes for executing a callback on threads without performing a global VM safepoint. Individual threads could be stopped instead of either all threads or no threads.


Remove the Native-Header Generation Tool (javah)
javah stuff no longer builds and apparently, the functionality is in javac now. This functionality provides the ability to write native header files at the time that Java source code is compiled, thereby eliminating the need for a separate tool.


What is BCP 47 language tags?
BCP 47 language
Tags used for Identifying Languages.
what is Java.util.Locale Class in Java?

As the name suggests util.Locale Class is used to perform locale task and provides locale information for the user. for more info read from here






Additional Unicode Language-Tag Extensions
Enhance java.util.Locale and related APIs to implement additional Unicode extensions of BCP 47 language tags.


As of Java SE 9, the supported BCP 47 U language-tag extensions are ca and nu. This JEP will add support for the following additional extensions:
cu (currency type)
fw (first day of week)
rg (region override)
tz (time zone)


What is NVDIMM?
A non-volatile dual in-line memory module (NVDIMM) is a type of random-access memory for computers. Non-volatile memory is memory that retains its contents even when electrical power is removed, for example from an unexpected power loss, system crash, or normal shutdown



Heap Allocation on Alternative Memory Devices
Enabling HotSpot to allocate the object heap on an alternative memory device, such as an NVDIMM memory module, specified by the user. This feature envisions that future systems may have heterogeneous memory architectures.


what does mean of x86 and x64?
x86 means 32 bit OS .. like Windows XP and x64 means 64 bit OS, like Windows Vista.



Experimental Java-Based JIT Compiler
Enabling the Grall Java-based just-in-time compiler to be used in an experimental fashion on the Linux/x64 platform.


Root Certificates
Provide a default set of root Certification Authority (CA) certificates in the JDK.

Time-Based Release Versioning:
Oracle has proposed a new version scheme for Oracle-based builds (YY.M) starting in March 2018. If Java version is released in March 2018 => YY = 18 from 2018 and M = 3(March) now version = 18.3. So Java 10 will be known as 18.3.



Oracle set a six-month release cycle for Java releases. There have been plans to name this upgrade and the successors based on the year and month of each release — the first release being named Java 18.3. Those plans were scrapped after some objections were raised.


Comments