Versions

[{“Name”:“Java SE 9 (Early Access)”,“GroupName”:null}]

Introduction

The arrival of Java 9 brings many new features to Java’s Collections API, one of which being collection factory methods. These methods allow for easy initialization of immutable collections, whether they be empty or nonempty.

Note that these factory methods are only available for the following interfaces: List<E>, Set<E>, and Map<K, V>

Syntax