Sequenced Collections in Java 21: Order as a Type, Not a Comment
JEP 431: SequencedCollection, SequencedMap, reversed views, and how new addFirst/getLast methods change APIs without a new List subtype zoo.
2 min read
Tag
4 articles · 14 min of reading
JEP 431: SequencedCollection, SequencedMap, reversed views, and how new addFirst/getLast methods change APIs without a new List subtype zoo.
HashMap's average O(1) performance depends on assumptions about hash distribution and load factor that are worth understanding before they're violated.
A broken equals or hashCode doesn't crash your program — it quietly corrupts HashMaps and HashSets in ways that only show up much later.
Streams read beautifully in code review and hide real performance costs in production. Here are the traps that show up most often and how to avoid them.