·
Sequenced Collection is a new interface in Java 21 that represents collections with a defined encounter order, and provides uniform APIs for accessing their first and last elements, and for processing their elements in reverse order.
Introduce new interfaces to represent collections with a defined encounter order. Each such collection has a well-defined first element, the second element, and so forth, up to the last element. It also provides uniform APIs for accessing its first and last elements, and for processing its elements in reverse order.
"Life can only be understood backward, but it must be lived forwards."
— Kierkegaard
- 0:00 vvauban
- 0:13 Java 21 Sequenced Collections
- 0:37 video summary
- 1:13 JEP 431
- 1:52 chatGPT simple definition
- 3:13 schema of the new List inheritance
- 4:44 demo addFirst / addLast
- 5:43 demo reversed
- 6:35 demo removeFirst / removeLast
- 7:33 conclusion with reddit
- 9:08 thanks
- 9:13 Udemy certification course