Add elements in ArrayList

We can use add() method of ArrayList to insert new elements to ArrayList There are 4 overloaded “add” methods defined in ArrayList 1) boolean add(Object o); 2) void add(int index, Object o); 3) boolean addAll(Collection

Share this article on

Arraylist overview

ArrayList is a java class which implements List interface Main features of ArrayList 1) It uses indexing to store the elements sequentially 2) It allows duplicate elements 3) It is not synchronized 4) Elements from Arraylist can be accessed using index 5) We can also use iterator and ListIterator to access the elements 6) Elements […]

Share this article on
< Previous Next >