Java tutorial
import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) { List<String> carList = new ArrayList<String>(); 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 */