get() Method : Java.util.ArrayList


Declaration :

Explanation :

Purpose Method returns the element at the specified position in this list
Parameters index ==> The index of the element to return
Return Value Returns the element at the specified position in this list
Exception IndexOutOfBoundsException ==> If the index is out of range

Example

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

Output :