Collection Tutorial
Collection Tutorial
• High Performance.
ArrayList
It Extends AbstractList and Impliments List
Interface
Advantages:
1.It is Dynamic array So it grows as needed.
How to create an ArrayList ?
ArrayList arrayList = new ArrayList();
To know the size:
arrayList.size();
To add value in to arraylist:
arrayList.add();
To remove a value from arraylist
arrayList.remove();
HashSet
It extends AbstractSet and impliments set
interface
Advantages:
Execution time for basic operation is fast.
How to Create?
HashSet hashSet = new HashSet();