Java/JDK 9 Features at a Glance

 
  
Java-9's full-fledged version is yet to be released but here I am going to discuss about its main developer features with reference to Early Access Build of JDK-9 and Java Magazine that I got from Oracle in my email last night around 11 PM NPT.

I will be explaining each feature with code examples where applicable and also provide implementation demo available at Github Repo.

Though the primary bone of JDK-9 is supposed to be JPMS( Java Platform Modular System), I am not going to mention it here as it's yet to be finalized by Java community.

NOTE: if you are IntelliJ IDEA user, FYI, IDEA version lower than 17 doesn't support Java 9.

 Nine Hot features inside of JDK-9 for Java hard-cores

1) Factory Methods for Collections
See example: java-stuffs/java9_features/src/main/java/Java9Collections.java

2) Optional Class Enhancement
See example: java-stuffs/java9_features/src/main/java/OptionalClass.java

3) Stream API Enhancement

4) New tool: Read-Eval-Print-Loop(REPL) - JShell
Try: $JAVA_HOME/bin/jshell

5) Concurrency Updates
Java 7 added fork/join, java 8 added parallel streams, and now here java 9 has added publish-subscribe model to streams

6) Milling Project Coin
Private methods can be added to interfaces single underscore is no longer valid as variable name, in Jdk-10 it will be used as lambda variable

7) Spin-Wait-Hints
New method onSpinWait() has been added to Thread, supports optimization in JVM and Processor

8)Variable Handles

9) Process API Updates
In addition to Process and ProcessBuilder, jdk9 introduces new interface ProcessHandle interface.
This new interface is used to make a UNIX-style pipe line of Process Builders.

TODO: JPMS

Reference: Java 9 Magazine July/August issue.

8 comments

This comment has been removed by the author.

I got what i am seraching from last few days in your Blog. I hope you will share more info about it. Please keep sharing.
Laptop Service center in Ameerpet
Dell Service center in Ameerpet
HP Service center in Ameerpet
Lenovo Service center in Ameerpet

This comment has been removed by the author.
This comment has been removed by the author.
This comment has been removed by the author.

Thanks for providing updated information

Sanjary Academy is the best Piping Design institute in Hyderabad, Telangana. It is the best Piping design Course in India and we have offer professional Engineering Courses like Piping design Course, QA/QC Course, document controller course, Pressure Vessel Design Course, Welding Inspector Course, Quality Management Course and Safety Officer Course.
Piping Design Course
Piping Design Course in Hyderabad ­
Piping Design Course in India­

Great information of the blog I liked it

Sanjary Academy provide pressure vessel design,quality management system course, piping design course, qa/qc course and document controller course.
Welding Inspector Course
Safety officer course
Quality Management Course
Quality Management Course in India

This comment has been removed by a blog administrator.