Collection Framework, List, Set, Map
Core Collection Framework: List, Set and Map interfaces and their implementations.
Collection is the root interface: List (duplicates allowed), Set (no duplicates), Queue; Map is separate (key-value pairs). ArrayList is a resizable array with fast access; LinkedList is doubly-linked. HashSet is unordered, LinkedHashSet ordered by insertion, TreeSet sorts elements; HashMap is unordered, LinkedHashMap ordered by insertion, TreeMap sorts keys. Generics like List add compile-time safety; autoboxing converts int to Integer.
Example
List < String > l = new ArrayList <>();
Map < String, Integer > m = new HashMap <>();
No comments yet.