First let’s see the collections advantages over array
- Continuous memory
- Unused memory will be wasted
- cannot say the array size upfront
Collection is basically called a collection of objects Interfaces – all are contracts
- Set – ex: playing cards – no order is maintained- no duplicate elements are present
- List – ex: Grocery list – insertion order- can have duplicates!
- Map