Back to Blog

javacollections
Java Collection
This is a demonstration of Java Collection
S
Sumiran Dahal
•6 min read
Java Collection Framework – Quick Summary
The Java Collection Framework provides a unified architecture to store, manipulate, and process groups of objects. It includes interfaces, implementations, and utility classes.
Core Hierarchy
- Collection (root interface for List, Set, Queue)
- Map (separate hierarchy for key-value pairs)
1. List (ordered, allows duplicates, index-based access)
- ArrayList → fast random access (O(1)), slow middle insert/remove
- LinkedList → fast insert/delete at ends, slow random access, also implements Deque
- Vector → synchronized (legacy, rarely used today)
2. Set (no duplicates)
- HashSet → fastest (O(1)), no order
- LinkedHashSet → maintains insertion order
- TreeSet → sorted (natural order or Comparator), O(log n)
3. Map (key → value, unique keys)
- HashMap → fastest (O(1) average), no order
- LinkedHashMap → insertion order (or access order mode)
- TreeMap → sorted by keys, O(log n)
- Hashtable → legacy synchronized version (rarely used now)
4. Queue / Deque
- → priority-based ordering (heap)
Share:
Comments (5)
A
AnonymousFebruary 16, 2026
jj
A
AnonymousFebruary 1, 2026
Great
A
AnonymousFebruary 1, 2026
hjhk
A
AnonymousFebruary 1, 2026
gkjhjhk
A
AnonymousFebruary 1, 2026
fkhgjh