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
More information about module system and JDK 9 can be found online:
JEP 261: Module System
JEP 200: The Modular JDK
JDK 9 release
Java 9 expert insights
JDK 9 documentation
Java SE & JDK 9 API Specification
Oracle JDK 9 and JRE 9 Certified System Configurations
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.