The List interface is an ordered collection that allows duplicate entries, use it for dynamic arrays.
Source Code
List list = new ArrayList();
list.add("Apple");
list.add("Banana");
list.add("Cherry");
System.out.println(list.get(1)); // Access elements by index