All collections implements Collection interface ArrayList
List
LinkedList HashSet
Set
02- Defining & Iterating Collections
no duplicates TreeSet SortedSet ArrayDeque
Deque
FIFO & LIFO FIFO
Queue
LinkedList
PriorityQueue SortedMap TreeMap
Map collection: container of zero or more elements toString representation is not good add: arrays dont resize
HashMap
Collections are iterable The Problems with an Array
01- Introduction
Duplicates: unique elements when we add
03- Lists
Java Collections
LinkedList
part of JDK implementing data structures can be hard
ArrayList
Why Collections
Collection of distinct elements, no duplicates HashSet based upon HashMap, look for hashCode method
04- Sets TreeSet