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

Code Example 1

List<String> cities = new ArrayList<String>();
cities.add("Tuguegarao City");
cities.add("Tabuk City");
cities.add("Davao City");

System.out.println(cities.get(1)); //prints "Tabuk City"

Learn ReactJs, React Native from akashmittal.com