arraylist.get index code example
Example 1: java arraylist access index
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"
Example 2: arraylist get value at index java
get(index);