Speaker Details

Stuart Marks
Stuart Marks is the JDK Core Libraries project lead in the JavaPlatform Group at Oracle. His areas of expertise include Collections,Lambdas, and Streams. As his alter ego "Dr Deprecator" he also workson Java's deprecation mechanism. Stuart previously worked on JavaFXand Java ME at Sun Microsystems. He has over thirty years of softwareplatform product development experience in the areas of windowsystems, interactive graphics, payments, and mobile and embeddedsystems. Stuart holds a Master's degree in Computer Science and aBachelor's degree in Electrical Engineering from Stanford University.
Ask the Java Architects
Conference (BEGINNER level)
Java 21 has now arrived. This release builds on the continuous innovation momentum since Java 10. It introduces advancements in Project Amber, Project Loom, Project Panama and many more areas. In this staple session at Devoxx Belgium, connect with Java luminaries from Oracle and have your Java questions addressed.
The Java Collections Framework has historically lacked a collection type that represents a sequence of elements with a defined ordering, along with uniform operations that apply across such collections. These gaps have been a continual source of problems and complaints. These deficiencies have been resolved with the introduction of Sequenced Collections in JDK 21.
Sequenced Collections (JEP 431) is the first new abstraction to be added to Collections since the introduction of Streams in JDK 8. Although the concept of encounter order has always been present in Collections, it has never had an explicit interface type in the API, and thus there has never been a place to define a common set of operations that apply to ordered collections. New operations include addition, retrieval, and removal of elements at either end of the collection, and the ability to view, iterate, and stream elements in reverse order.
Another significant feature is the rehabilitation of LinkedHashSet and its sibling LinkedHashMap. LinkedHashSet is like an ordered Set or a List with unique elements. However, the operations on LinkedHashSet are glaringly deficient. It is a concrete class with no corresponding interface, conflicting with the idiom of programming to the interface. Sequenced Collections solves all of these problems.
Attendees will learn about the new enhancements to the Collections Framework and how they can improve and streamline their code using the new Sequenced Collections APIs.
Beneath the Planet of the Collections
In the last 25 years, the classes of the Java Collections Framework have become arguably the most used data structures on the planet, part of everyday life for millions of developers. So there’s a wealth of experience in how best to use them and in the pitfalls to avoid. And how well has the design has held up? How have collections changed with the changing priorities of the platform, and how should they change in the future? Things we'll consider:
– The need for concurrent programming is driving Java towards a more functional style, but collections were designed around in-place mutation. Should immutability now be added? We’ll argue this question back and forth, with examples from other frameworks to illustrate the tradeoffs;
– Anything as complex and long-lived as the collections framework is bound to attract controversies; we’ll explain some, and invite you to take sides;
– We’ll take some examples of code using collections and, with your help, we’ll improve them – and maybe discover some guidelines for good practice as we go;
– What about the next 25 years? We’ll look at some exciting ideas that might mean big changes in the way we program with collections.
This session is for every Java developer who needs to use the collections framework – that's every Java developer. You'll leave with a deeper understanding of the design forces that shaped the framework, and with sharpened practical knowledge of how to get the very best from it.