Check out example codes for "java first index of an arraylist". It will help you in understanding the concepts better.

Code Example 1

ArrayList<Type> array = new ArrayList<Type>();
System.out.printLn(array[0]);

Learn ReactJs, React Native from akashmittal.com