1 Array List
1 Array List
ArrayList(class):
=========
The Underlying Data Structure for ArrayList is Resizable Array OR Growable Array.
Duplicate Objects are allowed.
Insertion Order is Preserved.
Heterogeneous Objects are allowed (Except TreeSet Everywhere
Heterogeneous Objects are allowed).
null Insertion is Possible.
Implements Serializable and Cloneable Interfaces and RandomAccessInterface.
Example :
package list;
import java.util.ArrayList;
Constructors:
1) ArrayList l = new ArrayList();
Creates an Empty ArrayList Object with Default Initial Capacity 10.
If ArrayList Reaches its Max Capacity then a New ArrayList Object will be Created
with
=(16*3/2)+1
=(8*3)+1
=24+1
=25
Example :
package list;
import java.util.ArrayList;
Example :
package list;
import java.util.ArrayList;
Example :
package list;
import java.util.ArrayList;
import java.util.HashSet;
}
}