Java -Collection part -1 ArrayList
- May 5, 2017
- 1 min read
Collections in java is a framework that provides an architecture to store and manipulate the group of objects.
Collection represents a single unit of objects i.e. a group.
Collection framework represents a unified architecture for storing and manipulating group of objects. It has:
Interfaces and its implementations i.e. classes
Algorithm

Let'us Divide into collection from very Basic ............. how to create collection

Above Program show a very basic implementation of collection.
Know Lets dig more into it with some more examples
JAVA ARRAYLIST
Java ArrayList class uses a dynamic array for storing the elements. It inherits AbstractList class and implements List interface.
The important points about Java ArrayList class are:
Java ArrayList class can contain duplicate elements.
Java ArrayList class maintains insertion order.
Java ArrayList class is non synchronized.
Java ArrayList allows random access because array works at the index basis.
In Java ArrayList class, manipulation is slow because a lot of shifting needs to be occurred if any element is removed from the array list
Below is an implementation of ArrayList































Comments