Collection Framework in Java
Collection Framework in Java
1. Introduction
The Collection Framework in Java is a unified architecture for storing and manipulating
groups of objects. It includes interfaces, implementations (classes), and algorithms that help
manage data efficiently.
Key Features:
• ArrayList
• LinkedList
• Vector
• Stack (LIFO)
• Inherits Vector.
• HashSet
• LinkedHashSet
• TreeSet
• PriorityQueue
• HashMap
• LinkedHashMap
• TreeMap
• Hashtable
• Thread-safe, no null keys/values.
4. Iterators in Collection
7. Thread-Safety in Collections
Yes
Order Yes Yes No (sorted) No Yes (sorted)
Performance
(Search) O(1) O(n) O(1) O(log n) O(1) O(log n)
Performance
(Insert/Delete) O(n) O(1) O(1) O(log n) O(1) O(log n)
9. Conclusion