Modern Developer, Oracle News | April 6, 2017

What's Cool in Java 8, and New in Java 9

By: Yolande Poirier


Which features in Java 8 and 9 should you look at first? Aurelio Garcia-Ribeyro, director of product management on the Java platform, explains the most popular features of Java 8 and 9.

The proposed schedule for the Java 9 general availability is July 27, 2017. Java 9 has over 90 Java enhancement proposals (JEPs) that are available in the JDK 9 early access. To help you navigate those JEPs, Aurelio classified the JEPs in 5 categories, which are: behind the scenes, new functionality, new standards, housekeeping and gone. In this presentation, he describes some of the most important JEPs in each category.  

Behind the scenes: functionalities that you get as default in JDK 9. They will be compatible with your current code and tools and you will get better performance 

250: Store Interned Strings in CDS Archives
254: Compact Strings 
225: Javadoc Search
New functionality: new capabilities that you have to change your code or use new tools to get. 

Project Jigsaw: Module system for the Java platform 
282: jlink, the Java Linker 
277: Enhanced deprecation 
269: Convenience Factory Methods for Collections 
222: Shell, a read-eval-print loop (REPL) 
238: Multi-release JAR Files 

New standards: JDK 9 will take advantage of new standards in the industry. 

267: Unicode 8.0 
226: UTF-8 Property resource bundles 
249: OCSP Stapling for TLS 
287: SHA-3 Hash algorithms 
110: HTTP 2/Client 

Housekeeping: improvements to existing libraries, changes in internal code,  work for future improvements.

260: Encapsulate most internal APIs
275: Modular Java application packaging 
223: New version-string scheme 
295: Ahead of time compilation 
280: Indify string concatenation 
271: Unified GC Logging 
248: Make G1 the default Garbage Collector 
213: Milling Project Coin 
290: Filter incoming serialization data 
214: Remove GC combinations  

You can test any of those functionalities by trying the JDK 9 early access The full list of JEPs is available as part of the OpenJDK JDK 9 

For JDK 8, Aurelio gives an example demonstrating how to use lambdas in Java 8 and pass not just data but behavior. He also explains the default and reference methods. For example, when you define a collection interface you can pass a default method. This will ensure compatibility with code written for older versions of your interfaces and add new functionality to your interfaces. 

Chapters for Java 8 features 
Lambda Expressions - 2m29s 
Default Methods and Method References - 10m04s 
Date and Time API - JSR 310 

Yolande Poirier is manager of Java marketing at Oracle.

More about Yolande Poirier
This is a syndicated post, view the original post here