add(index) Method : Java.util.ArrayList


Declaration :

Explanation :

Purpose Method inserts the specified element E at the specified position in this list.
Parameters index ==> The index at which the specified element is to be inserted.
element ==> The element to be inserted
Return Value NA
Exception NA

Example

The following example shows the usage of java.util.Arraylist.add(E) method.

Output :