//ArrayList is a class in the Java API, unlike array, ArrayList object's size is automatically adjusted import java.util.ArrayList; public class eg12_ArrayList { public static void main(String[] args) { ArrayList nameList = new ArrayList(); //create ArrayList object nameList.add("James"); nameList.add("Catherine"); nameList.add("Bill"); //Display the items and indices for (int index=0; index