import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
List carList = new ArrayList();
carList.add("A");
carList.add("B");
carList.add("C");
carList.add("D");
String[] carArray = carList.toArray(new String[0]);
for (String car : carArray) {
System.out.println(car);
}
}
}
/*
A
B
C
D
*/