Wednesday, 6 August 2014

Java 9 Features

Java 9 Features

  1. Project Valhalla
  2. Project Sumatra
  3. JNI (Java Native Interface) 2.0
  4. Collections Enhancements to support BigData
  5. Process API
  6. Contended Locking Enhancements
  7. Segmented Code Cache
  8. Light-Weight JSON API
  9. sjavac (Smart Java Compiler) Enhancements
  10. Project Jigsaw - Modularize JDK Source Code
  11. HTTP2 Client
  12. Money and Currency API
  13. REPL in Java

Project Valhalla
It all about Java Generics. It allows to use primitives in Generics to avoid type erasure issues.

Example:-
List<int> list = new ArrayList<>();

Modularize JDK Source Code

Reorganize the JDK source code into modules, enhance the build system to compile modules, and enforce module boundaries at build time.

Smart Java Compiler(sjavc) Enhancements

Improve the sjavac tool so that it can be used by default in the JDK build, and generalize it so that it can be used to build large projects other than the JDK.

Light-weight JSON API

Provide a light-weight API for consuming and generating JSON documents and data streams.

Segmented Code Cache

Divide the code cache into distinct segments, each of which contains compiled code of a particular type, in order to improve performance and enable future extensions.

Process API

Improve the API for controlling and managing operating-system processes.

Contented Locking Enhancements

Improve the performance of contended Java object monitors.

HTTP2 Client

Http client for HTTP2 and WebSockets

REPL in Java

REPL stands for Read-Evaluate-Print-Loop.
Like other languages, Java will also have a REPL to test it very quickly.