add() Method : Java.util.ArrayList


Declaration :

Explanation :

Purpose Method appends the specified element E to the end of the list.
Parameters ele ==> The element to be appended to this list.
Return Value Method returns true.
Exception NA

Example

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

Output :