Check out example codes for "arraylist java methds". It will help you in understanding the concepts better.

Code Example 1

import java.util.ArrayList;
ArrayList<Integer> myList = new ArrayList<Integer>();
myList.add(0);
myList.remove(0);//Remove at index 0
myList.size();
myList.get(0);//Return element at index 0

Learn ReactJs, React Native from akashmittal.com