Collections Refueled

July 13, 2017 | 2 minute read
Text Size 100%:

Java collections is one of the most used frameworks in Java with array lists being the most popular functionality. In his presentation, Stuart Marks dives into the new features of collections in Java 8, as well as what’s coming in Java 9. For those of you who don't know Stuart, he works on JDK core libraries at Oracle. 

Most developers have moved to JDK 8 by now, and Stuart describes the new JDK 8 features that you might have overlooked.  One of those new features is the introduction of a set of default methods to the collection interfaces. Default methods enable you to add methods to existing interfaces without breaking compatibility; e.g., converting a collection into a stream. 

Stuart goes over some improvements to Iterable, Collection and List: 

The collection interfaces with the newest methods are Map and Comparator. Stuart drills down and gives you examples: 

In Java 9 improvements to the collections framework include factory methods for collections, which introduce methods that make it easy to create collections.

You can learn more about the JEPs in Java 9 on the OpenJDK website. Here is a direct link to the aforementioned JEP 269 - Convenience factory methods for collections

Check out the changes to Java 9 in the OpenJDK community. Try out the JDK 9 early access build at and provide feedback on the early access forum 

JDK 9 documentation early access is available here. Another must-read is the new AdoptOpenJDK community GitHub website with articles, use cases and much more.  

More information about module system and JDK 9 can be found online: 
JEP 261: Module System 
JEP 200: The Modular JDK 
JDK 9 release 
Release notes  
Java 9 expert insights
JDK 9 documentation 
Migration guide
Java SE & JDK 9 API Specification
Oracle JDK 9 and JRE 9 Certified System Configurations

Related blog: Modular Development with JDK 9 
Two editions of Java Magazine are dedicated to Java 9. Register for free! 

Yolande Poirier

Yolande Poirier manages the online experience for the world's biggest IT community. She empowers developers to successfully grow their projects, businesses, and careers. Telling the story of how people use technology, she curates technical content, interviews IT professionals around the world, and write blogs about Java technologies and projects. She is a speaker at international conferences and JavaOne Rock Star, this year's track lead of the developer community day and a long time member of @jduchess, a network of women in Java. She manages @Java, a network of over 350,000 developer enthusiasts.

Previous Post

Plan Your Trip to JavaOne 2017

Sonal Mecwan | 1 min read

Next Post

Get Ready for Java 9

Yolande Poirier | 2 min read