Collections in Java
Collections lie in java.util package
- ArrayList and LinkedList extend List Interface.
- And List extends Collection
- Other than ArrayList and LinkedList we can use HashSet and LinkedHashSet
- Basically List , Set ,Queue and DeQueue extends Collection
- Another thing to note is for ArrayList ,LinkedList and LinkedHashSet items appear in order in which they were added .In HashSet they are not in order.
- Also note in Sets we can't add duplicate items.