Java-9 Features (JDK 9)




Oracle has released Java-9 on 21st September 2017, with rich set of new features. It includes various upgrades to the Java programming, JVM, Tools and libraries. In this tutorial, we will see what all major changes it has brought to us.

New Features in Java 9 :

  1. Java 9 REPL (JShell)

  2. The Java Platform module system (Project Jigsaw)

  3. Private methods in Interfaces

  4. Try With Resources Improvement

  5. Factory Methods for Immutable List, Set, Map and Map.Entry

  6. Diamond Operator for Anonymous Inner Class

  7. Process API Improvements

  8. Stream API Improvement

  9. Enhanced @Deprecated annotation

  10. @SafeVarargs Annotation

  11. Optional Class Improvements

  12. Improved JavaDocs

  13. HTTP 2 Client

  14. Multiresolution Image API

  15. CompletableFuture API Improvements

  16. Lightweight JSON

  17. Reactive Streams API


1. Java 9 REPL (JShell)

Oracle Corp has introduced a new tool called "jshell". It stands for Java Shell and also known as REPL (Read Evaluate Print Loop). It is used to execute and test any Java Constructs like class, interface, enum, object, statements etc. very easily.

To learn more click here


2. The Java Platform module system (Project Jigsaw)

A new kind of Java programming component introduced as module, which is a named, self-describing collection of code and data.The main goal of this project is to easily scale down application to small devices.It also allows us to develop modular applications.

To learn more click here


3. Private methods in Interfaces

Enhanced interfaces with private and private static methods.

To learn more click here


4. Try With Resources Improvement

Java introduced try-with-resource feature in Java 7 that helps to close resource automatically after being used.

In Java 7, try-with-resources has a limitation that requires resource to declare locally within its block.

Java 9 is going to provide some improvements to this statement to avoid some more verbosity and improve some Readability.

To learn more click here


5. Factory Methods for Immutable List, Set, Map and Map.Entry

Java 9 has introduced some convenient factory methods to create Immutable List, Set, Map and Map.Entry objects. These utility methods are used to create empty or non-empty Collection objects.

To learn more click here




6. Diamond Operator for Anonymous Inner Class

Java 9 introduced a new feature that allows us to use diamond operator with anonymous classes.

The diamond operator to be used with anonymous classes if the argument type of the inferred type can be denoted.

To learn more click here


7. Process API Improvements

Java has improved its process API in Java 9 version that helps to manage and control operating system processes.

To learn more click here


8. Stream API Improvements

Java 9, Stream API has improved and new methods are added to the Stream interface. TakeWhile, dropWhile and ofNullable, and one overloaded iterate method are added to perform operations on stream elements.

To learn more click here


9. Enhanced @Deprecated annotation

Java 9 has enhanced @Deprecated annotation to provide more information about deprecated API and also provide a Tool to analyse an application’s static usage of deprecated APIs.

To learn more click here


10. @SafeVarargs Annotation

It is an annotation which applies on a method or constructor that takes varargs parameters. It is used to ensure that the method does not perform unsafe operations on its varargs parameters.

To learn more click here




11. Optional Class Improvements

New useful methods are added to java.util.Optional class.

To learn more click here


12. Improved JavaDocs

Supports HTML5 output generation. Provides a search box to generated API documentation.

To learn more click here


13. HTTP 2 Client

New HTTPClient API supporting websockets and HTTP 2 streams and server push features.

To learn more click here


14. Multiresolution Image API

Supports encapsulation of a set of images with different resolutions into a single multiresolution image.

To learn more click here


15. CompletableFuture API Improvements

Java 9 has improve CompletableFuture API to solve some problems raised in Java SE 8. Java 9 has added some delays and timeouts, some utility methods and better sub-classing.

To learn more click here


16. Lightweight JSON

A lightweight API introduced to consume and generating documents and data streams via json in java 9.

To learn more click here


17. Reactive Streams API

Now-a-days, Reactive Programming has become very popular in developing applications to get some beautiful benefits.

A new Reactive Streams API in Java SE 9 has been introduced to support reactive programming in java 9.

To learn more click here


Next topic is Java Shell (JShell)




 






Training For College Campus

We offers college campus training for all streams like CS, IT, ECE, Mechanical, Civil etc. on different technologies like
C, C++, Data Structure, Core Java, Advance Java, Struts Framework, Hibernate, Python, Android, Big-Data, Ebedded & Robotics etc.

Please mail your requirement at info@prowessapps.in


Projects For Students

Students can contact us for their projects on different technologies Core Java, Advance Java, Android etc.

Students can mail requirement at info@prowessapps.in



CONTACT DETAILS

info@prowessapps.in
(8AM to 10PM):

+91-9026070669 , +91-9451396824

© 2016, prowessapps.in, All rights reserved