Java Collections Framework
Collections Framework
Unified architecture for storing/manipulating groups of objects.
Collection Hierarchy
Listlist = new ArrayList<>(); Set set = new HashSet<>(); Map map = new HashMap<>(); list.add("Java"); set.add(1); map.put("age", 25);
Key Points
- List: ordered, duplicates allowed.
- Set: unique elements only.
- Map: key-value pairs.
- Generics ensure type safety.