List<String> list = new ArrayList<>();
list.add("A");
list.add("B");
list.add("C");
String firstElement = list.get(0);
System.out.println("First element: " + firstElement);
String[] array = {"A", "B", "C"};
String firstElement = array[0];
System.out.println("First element: " + firstElement);
List<String> list = new ArrayList<>();
list.add("A");
list.add("B");
list.add("C");
Iterator<String> iterator = list.iterator();
String firstElement = iterator.next();
System.out.println("First element: " + firstElement);