Top Tutorials to Learn Java 9 Features in Depth

DZone 's Guide to

Top Tutorials to Learn Java 9 Features in Depth

It's not too late to learn more about the features and enhancements in JDK 9.

· Java Zone ·
Free Resource

It’s been more than a year since JDK 9 was released, and if you haven't touched Java 9, this year is probably the best time to learn Java 9 and get yourself familiar with new features and enhancements on existing APIs. The highlight of JDK 9 release was Project Jigsaw or Module System.

The Java 9 Platform Module System allows Java to move forward by modularizing the JDK as well as adding modules as first-class citizens to Java, but that’s not the only thing to look forward, there are many small changes that are very useful in day-to-day coding.

For me, the static factory methods introduced in List, Set, and Map to create an immutable list, set, and map are the most interesting ones — along with several changes on Stream API and Optional class. Those are the ones that I will most likely use as soon as we start with JDK 9.

If you are a regular reader of my blog, then you might have noticed that I haven’t published many articles on JDK 9 yet, but I have been learning and doing some research over the last a couple of days and this article is the result of that.

Also, when Java 8 was released in 2014, I had published a list of best Java 8 tutorials that many of my readers have appreciated and I thought to do the same this time as well

In this article, I am going to share some of the interesting articles, tutorials and online courses which you can use to learn Java 9. These are some of the best resources on JDK 9 at the moment. They are very good to start with and get yourself familiar.

For more deep dive and in-depth knowledge, I suggest picking a good book on Java 9 or joining a course like What’s New in Java 9 — Modules and more — this is a better option.

List of Must Read Java 9 Tutorials

Anyway, without further ado, here is the list of useful tutorials to learn JDK 9:

1. Nine New Developer Features in JDK 9

This is one of the first articles I read to learn more about Java 9 features. The article explains two of my favorite features, Factory Methods for Collections (JEP 269) and Stream API Enhancements. If you are interested in those two, then you can read that article.

Also, this is actually an excerpt from the July/August 2017 issue of Java Magazine.

So, if you want to learn all nine features, make sure you read the full article in Java Magazine. You can find the link at the bottom of that article.

2. 9 New Features in Java 9

This is another good list of essential JDK 9 features on the Pluralsight blog by Sander Make, author of Java 9 Modularity: First Look course on PluralSight.

In this article, Sander has gone through nine of the essential JDK 9 features that matter most for Java developers.

I particularly liked his example of the Java platform module system and how modules are linked together in a modularized JDK.

The list also covers JShell: the interactive Java REPL, improved Javadoc, collection factory methods, Stream API improvements, private interface methods, HTTP/2, and multi-release JARs.

3. Code First Java 9 Module System Tutorial

Project Jigsaw or the Module System was one of the highlights of the JDK 9 release, and this is probably the best course to start with.

The writer is also the author of The Java 9 Module System, which means you will get a comprehensive overview of authority.

In this tutorial, you will first learn a simple Hello World example and learn how to take an existing demo application and modularize it with Java 9.

You will also learn how to create module declarations (module-info.java) and use the module path to compile, package, and run the application.

If you want to learn more, Joshua Bloch has also provided a nice overview of JDK 9’s Module system on Item 51 of Effective Java 3rd Edition, one of the must-read books for Java programmers.

4. First Steps With Java 9 and Project Jigsaw

This is another great tutorial to learn Project Jigsaw or the JDK 9 Module System.

It’s a two-part tutorial; in the first part, you will learn what is a module and how the Java runtime was modularized with a demo application that demonstrated how to (and not to) compile, package, and run a modular application.

In the second part, he explains how Jigsaw interoperates with non-modular legacy code and how you can build your own Java runtime images.

In short, this tutorial offers very comprehensive coverage of the Java 9 Module System with some hands-on advice on how to compile, build, and run a modular application in Java 9.

5. What’s New in Java 9 — Modules and More!

This is one of the best courses to learn Java 9 at the moment. You will not only learn about installation and setup of JDK 9 but also all important Java 9 features, like:

  1. The Java Shell (REPL)
  2. The Java 9 Platform Module System
  3. The Streams API
  4. Private Method in Interfaces
  5. Factory Methods for Collections
  6. Try With Resources
  7. Diamond Operator
  8.  SafeVarargs annotation

It also covers updates to the Process API, which now allows Java developers to work with native processes directly in Java code. In short, this is one of the best resources to learn Java 9 in no time.

6. Java 9 New Features on Baeldung

The Baeldung blog also has a nice overview of most of the useful Java 9 features. It’s not comprehensive but does provide an overview of what every Java developer should know as far as Java 9 changes.

It includes both major changes, like Project Jigsaw, the Module System, and Http 2.0 client, but also smaller language enhancements like Diamond Operator Extension, methods on an interface, Try-with-resource enhancements, and new API enhancements, like changes on Optional and Stream API. It also covers JShell.

In short, if you need a quick overview of JDK 9 features, then this is a good list to start with. If you need a more comprehensive overview, I suggest joining What’s New in Java 9 — Modules and More on Udemy.

7. Java 9 Features With Examples on JournalDev

This is another good list of JDK 9 features with small examples. It includes most of the JDK 9 changes at the language and API level, along with Module Systems and factory method enhancements.

Here is a full list of features covered in this article:

  1. Java 9 REPL (JShell)
  2. Factory Methods for Immutable List, Set, Map, and Map.Entry
  3. Private methods in interfaces
  4. Java 9 Module System
  5. Process API Improvements
  6. Try-With-Resources improvement
  7. CompletableFuture API improvements
  8. Reactive Streams
  9. Diamond Operator for Anonymous Inner Class
  10. Optional Class improvements
  11. Stream API improvements
  12. Enhanced @Deprecated annotation
  13. HTTP 2 Client
  14. Мulti-resolution image API
  15. Miscellaneous Java 9 features

I really like their short description and short examples. The list is pretty much similar to the previous list and you can refer to it if you need a quick overview.

If you need to learn each feature in-depth, then you better join this Java 9 course on Udemy, one of the better courses to learn more about JDK 9.

That’s all for now about some of the best tutorials and courses to learn Java 9. We are already on JDK 12, but there are many Java developers out there who are still going through JDK 8 features.

I don’t know if I am going to use Module System anytime soon, but I am sure that I’ll use the API enchantments, e.g. factory methods for creating immutable List, Set, and Map, as well as some Stream API enchantments as soon as we move to Java 9.

Other resources you may like to explore:

Thanks for reading this article. If you like these tutorials, then please share them with your friends and colleagues. If you have any questions or feedback, then please leave a comment below.

JDK, JDK 9, development, java, java 9, jshell, module system, programming, project jigsaw, stream API

Published at DZone with permission of Javin Paul , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}