Tagged “Collections”
2 articles with this tag.
- IteratorTraverse a collection without exposing how it is stored. A runnable Java 21 iterator that hides cursor-based API pagination behind Iterable and Stream, internal versus external iteration, fail-fast iterators and Spliterator, with trade-offs and interview questions.
- Collections FrameworkHow Java collections work inside: the interface hierarchy and sequenced collections (Java 21), ArrayList vs LinkedList, HashMap internals (hashing, buckets, treeification, resizing), LinkedHashMap and LRU caches, TreeMap, sets, queues and deques, immutable collections, fail-fast iterators, and choosing the right collection.